Qt Quick Ultralite loads all images from flash memory to RAM on startup by default. This approach may limit usable size of RAM and assets size that one can fit into the applications.
The problems can be compensated by caching the images.
How to enable caching of images:
- Set the resource cache size using qul_set_maximum_resource_cache_size to desired size.
- Set the QUL_RESOURCE_CACHE_POLICY resource property to "OnDemand" for individual files, or make it the default by setting QUL_DEFAULT_RESOURCE_CACHE_POLICY.
The user must choose an appropriate cache size to prevent frequent deletion, which can cause frame drops. The cache size must be at least as big as the biggest single image. Refer to the documentation for qul_set_maximum_resource_cache_size for more details.
The cache is also used for images that need to be decompressed at runtime.
The image cache size used by the application can be seen in the performance logs.
Refer to Resource cache for tips about choosing an appropriate cache size.
Available under certain Qt licenses.
Find out more.