[Interest] Loading Qt5 libraries during boot

Bill Crocker william.crocker at analog.com
Fri Feb 1 17:36:28 CET 2013


>
> Looks like you need a two plans of action:
>
> 1) figure out why it is taking 2 seconds loading: profile the loading and
> propose patches to Qt.
>
> 2) implement the kdeinit / booster trick. I'm not sure there's a good
> reference online, but here's a very, very summarised summary:
>   - all applications become plugins instead
>   - there is only one central application
>   - the central application links to Qt but does not *use* anything
>     (no QCoreApplicaiton, no QApplication, no QFile, no QObject, no QString)

That brings us to one of Qt's lesser publicized constraints.
Qt can not safely be used from a forked context, because you never
know which parts of it might be using threads.
I learned that the hard way.

:-)

Bill

>   - the central application starts and listens for requests
>   - each requests tells it what to plugin to start, by:
>     a) fork
>     b) dlopen
>     c) call a main()-like function




More information about the Interest mailing list