[Interest] QML Qt.createComponent() running faster with profiler attached

Tomasz Siekierda sierdzio at gmail.com
Wed Nov 12 12:38:27 CET 2014


Hi,

I've got a problem: in the project I'm working on, we are loading a
pretty big QML component using Qt.createComponent(). It takes about
500ms to load, which is a bit too much. Other panels in the same
application load in about 80ms, so this difference is really
noticeable. And the target board will be wimpy compared to dev
machines, of course.

Now, the big blow: I've fired up QML Profiler (in Qt Creator) to see
what takes so long, and during profiling session, the same component
loads in just 150ms! Same happens, when I run the application with the
debugger attached. Just compiling in debug mode does not change the
time - the debugger/ profiler needs to be attached for the time to
drop.

It seems that the application is wasting time somewhere. I suspected
maybe signal-slot connections, or threading to have something to do
with it, but after looking and debugging through the code for 4 days I
still have not found anything that might introduce this 350ms lag.

So, my question is - does anybody have any idea why
Qt.createComponent() may work *slower* when the profiler/ debugger is
*not* attached? How to get the same performance in normal app
operation as I'm getting during debugging?

Have a good time,
sierdzio



More information about the Interest mailing list