I recently read about how using layer.enabled
can shave off loading time for some screens but it also mentioned that it's not always an optimization. Documentation mentions says
Enabling layering for complex QML item hierarchies can sometimes be an optimization.
But it is not clear to me when exactly it's an optimization? What are the best use-cases? Are there any downsides of using it? If not, why is it just not enabled by default?
CodePudding user response:
Setting layer.enabled
means (complex) item is rendered once into a texture and cached. Benefit? It can then be animated freely without the need to render it again every frame.
@JarMan already pointed to the part of documentation which explains why it's not necessarily good from the memory and performance point of view.