Jump to: navigation, search

Difference between revisions of "Fast Startup (Client)"


Line 3: Line 3:
 
{{UBIK}} caches all the local content (which exist on the device) in the devices' memory for fast access. However, as the number of objects grows, the device might become less responsive because of the large memory consumption.
 
{{UBIK}} caches all the local content (which exist on the device) in the devices' memory for fast access. However, as the number of objects grows, the device might become less responsive because of the large memory consumption.
 
Therefore, a [[UBIK Client Basics#Options|setting]] is provided to control how content is cached in the memory.
 
Therefore, a [[UBIK Client Basics#Options|setting]] is provided to control how content is cached in the memory.
{{Attention|The default value for this setting is lazy loading.}}
+
{{Attention|The default value for this setting is [[Memory Usage (Android)#Lazy loading|lazy loading]].}}
  
 
=== Eager loading ===
 
=== Eager loading ===
Line 9: Line 9:
  
 
=== Lazy loading ===
 
=== Lazy loading ===
After users log in, only the essential content is loaded initially into memory. For now, this means everything other than the property values, which are then loaded whenever needed. For example,
+
After users log in, only the essential content is loaded initially into memory. For now, this means everything other than the property values, which are then loaded whenever needed. For example, when
 
* The icons of objects are to be displayed;
 
* The icons of objects are to be displayed;
 
* Users need to look at the properties of objects;
 
* Users need to look at the properties of objects;

Revision as of 11:09, 3 October 2014

Setting

UBIK® caches all the local content (which exist on the device) in the devices' memory for fast access. However, as the number of objects grows, the device might become less responsive because of the large memory consumption. Therefore, a setting is provided to control how content is cached in the memory.

IC Attention.pngThe default value for this setting is lazy loading.

Eager loading

After users log in, all content is initialized and loaded into memory. This includes the content hierarchy, object display names, property values, etc.

Lazy loading

After users log in, only the essential content is loaded initially into memory. For now, this means everything other than the property values, which are then loaded whenever needed. For example, when

  • The icons of objects are to be displayed;
  • Users need to look at the properties of objects;
  • Documents(Thumbnails) are shown.

Comparison between eager loading and lazy loading

Setting Name Memory Usage Loading Delay Initialization Time after Login
Lazy Loading Less More Less
Eager Loading More Less More
IC Attention.pngWhen the setting is changed from lazy loading to eager loading, UBIK® will start loading all the content into memory in the background.

Technical background

  • MetaClass and MetaProperty are not affected by the memory usage setting since they're practically needed all the time;
  • Once an object's property values are cached under lazy loading setting, they will remain in the memory until one of the following happens:
    • The memory allocated to UBIK® is running low;
    • Offline preparation is finished with branch(es) downloaded.

See also