[Qt-qml] Any tips or tricks to help with long app startup times?

Todd Rose teeceeare97 at gmail.com
Tue Sep 27 20:37:15 CEST 2011


Thanks for the response Pelle.  I wonder if it would help if I routed
all QML Images through one of our native image providers and marked
them all as asynchronous.  Is the QPixmap cache still used even with
custom native image providers that return QImage?  Just loading the
QML and related images takes 7 seconds in our app.   I will look into
loading only the smallest subset of QML necessary at startup, and
doing the rest of the UI on-demand or on timers...unfortunately we
pretty much need the whole UI available at startup, a splash screen or
progress dialog would look prettier but it doesn't solve the problem.
-Todd

On Tue, Sep 27, 2011 at 11:12 AM, Pelle Johnsen <pelle.johnsen at gmail.com> wrote:
> From my experience QML does generally suffer a bit from slow startup time,
> especially on embedded platforms :S
> In the project I'm working on the 2 main problems we found are:
> 1. Actually creating instances of QML Items. In a large app. there can be
> thousands. This can to some extend be helped by splitting up the app and
> sort of delay/demand loading individual parts, so you get the main UI up as
> fast as possibly
> 2. QML Image uses QPixmap which can only be created in the UI thread, making
> it impossible to load QML in a background thread (not sure if there is some
> changes to this in 4.8). If you are doing custom Ui you probably have lots
> of images, which do take time to load up.
> Also see this forum
> thread: http://developer.qt.nokia.com/forums/viewthread/3144
>  -Pelle
>
> On Tue, Sep 27, 2011 at 4:58 PM, Todd Rose <teeceeare97 at gmail.com> wrote:
>>
>> We have a relatively large qt-qml application.  The back-end is C++
>> and front-end ui is about 70 or so QML files.  We're currently seeing
>> very long initial startup times (ten seconds or more) and we'd like to
>> know if there's any simple things that we can do to mitigate this.
>> Some of it is in our application domain and we're working on that
>> part, but the actual loading and rendering of the QML is also a quite
>> significant portion of overall initial startup time.  Are there any
>> tricks to make loading and initializing the qt and qtmobility
>> libraries faster?  What about the initial QML file load/parse phase?
>> We have all of our resource files stored in application subdirectories
>> - would packaging them in a qt resource file make any difference here?
>>
>> Thanks in advance,
>> Todd
>> _______________________________________________
>> Qt-qml mailing list
>> Qt-qml at qt.nokia.com
>> http://lists.qt.nokia.com/mailman/listinfo/qt-qml
>
>


More information about the Qt-qml mailing list