{{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. Also, the initial loading will take a considerable long time. Certain optimizations are added to overcome these problems.
== Optimization regarding object loading (WinX client) {{Version/WinXSince|3.0.0}} ==
In a lot of scenarios, users want to log into the app and start browsing through the object hierarchy as soon as possible. To offer better efficiency for these users, {{UBIK}} divides the loading of all local objects into two phases during the initial loading.
* First, the essential objects including the root and the infrastructure are loading during the login process;
{{Clear}}
[[Category:Client|Lazy Loading (Client)]]
[[Category:Xamarin|Fast Startup (Client)]]
[[Category:WinX|Fast Startup (Client)]]
== Optimization regarding property loading{{Version/AndroidSince|2.4.0}}{{Version/WinXSince|2.5.4}} ==
* Documents (Thumbnails) are shown.
[[Category:Client|Lazy Loading (Client)]]
=== Comparison between eager loading and lazy loading ===
== Technical background ==
* [[MetaClass]] and [[MetaProperty]] are not affected by the memory usage setting since they're practically needed all the time;
* On Android: 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(On Android);** Offline preparation is finished with branch(es) downloaded(On Android and WinX{{Version/WinXSince|3.3.0}}).
* On Android {{Version/AndroidSince|2.4.0}}: Initially all properties are loaded without property values. Once property values are requested, they are loaded on demand.
* On WinX{{Version/WinXSince|2.5.4}} and Android{{Version/AndroidSince|3.0.0}} : In general, properties and property values are only loaded on demand. However, those that are classification related are loaded initially so that certain classification-based calculations do not lead to all other properties being loaded as well. Since the information regarding which properties should be loaded initially is stored in the database, it is recommended to have a clean installation. WinX{{Version/WinXSince|2.5.4}}: If a clean installation is not possible, the app will still function if an old database is found. In that case, the first login will take a much longer time and the database will be automatically upgraded afterwards, which could take a couple of minutes depending on the amount of local content.
[[Category:Client|Lazy Loading (Client)]]
== See also ==