> Can you explain that a little more.
> Loaders trade startup delay for runtime cost.
> What are the units of measure for runtime cost?

Runtime cost is measured in CPU time spent while interacting with the 
application. In some places, such as when scrolling, increasing the CPU time 
spent can be problematic.

If you don't use a loader all the items you need are created when the 
application starts. That takes some time, but later when you use them they are 
already there and it takes very little time to show them or otherwise interact 
with them.

If you use a loader, the application starts more quickly but the items are 
created while you interact with it. This can lead to some unattractive effects 
like unfinished UI elements being visible and the frame rate dropping.

You can try some funny adventures I had with that by loading a large trace into 
the QML profiler, expanding all the categories and then comparing the vertical 
scrolling between
a, QtCreator 3.3
b, https://codereview.qt-project.org/#/c/103618/ and 
https://codereview.qt-project.org/#/c/103617/
c, https://codereview.qt-project.org/#/c/103648
d, QtCreator 3.5

I ended up writing a "SynchronousReloader" in order to be able to use 
asynchronous Loaders without having blank labels being visible during 
scrolling. However, I'm still not sure if the added CPU time spent on loading 
them after expanding the categories (and potentially during scrolling) is 
actually worth the reduced "startup" time when loading a trace.

-- 
Ulf Hermann
_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to