[Interest] QML Loader Performance

Ingo Schiller Ingo_Schiller at raykiel.com
Mon Mar 7 08:27:57 CET 2016


Hello,

I have a serious performance problem in my application which uses QML for 
the UI and several C++ datamodels. The application consists of several 
"pages", which is a set of ui elements and covers the whole screen. These 
pages can be loaded on request. Loading such a page is done by a QML 
Loader component. The loaded page itself loads other elements, so called 
"blocks" which group several ui elements. These "blocks" also contain a 
loader element which loads so called "widgets", UI qml elements used to 
display information. After loading a block or widget JS functions are used 
to set the properties (15 - 30) of the ui elements such as position, 
z-layer, data to display, etc. 

Load Page -> load block 1 -> load widget 1
                             -> load widget 2
                             -> load widget 3
                                              ...
                             -> load widget n
                       -> load block 2 -> load widget 1
                             -> load widget 2
                             -> load widget 3
                                              ...
                             -> load widget n
                      ...
                       -> load block n  -> load widget x

The problem is, that loading sich a "page" is far too slow, On a really 
good developer PC and as a release build it takes 150ms. On a weaker 
hardware it takes several seconds which is not acceptable. The time 
required to load a "page" is linear with the amount of "widgets" on that 
"page", no matter what widgets are on that page. I have very simple 
widgets which have only a label to display, up to grafical widgets with 
transparency and animations, but that does not seam to influence the 
loading procedure. 

I already tried several things  to speed it up:
- Use qt quick compiler
- Strip down loaded elements to have fewer properties
- Construct all elements on startup and only set them (in-)visible on 
request
- Omit z-layering 

Profiling the loading procedure shows that compiling the qml elements and 
painting are not the issues. 

Can anyone advise what I could do else? Or is that loader component so 
terribly slow? Any help is highly appreciated!


Regards,
Ingo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160307/65165483/attachment.html>


More information about the Interest mailing list