On Monday 09 September 2013 16:48:05 David Faure wrote:
> On Monday 09 September 2013 14:23:10 Sebastian Kügler wrote:
> > Martin Grässlin asked if we could offer an async API for this. Opinions?
> 
> This task is mostly I/O, and a bit of CPU.
> Portable async I/O requires doing it in a thread.
> To avoid setting up a thread every time, this could use QThreadPool (but a
> dedicated one, to avoid blocking the main one which is supposed to be about
> pure-CPU operations only), and the runnable would call the sync trader API.
> 
> So, it's feasible.
> But is it worth it?
Just adding the reasoning why I suggested it. We tried (in KWin) to move all 
the querying to a thread. It utterly failed due to KGlobal not being thread 
safe. The code is still there, so I will probably switch with frameworks 5.

In KWin all the plugin loading is during start up, but none of them is 
essential. By making it async we can significantly improve the startup time - 
that is the time till the first frame is rendered and the splash screen 
unfreezes.

Finding a large number of plugins at startup is - I assume - relevant to many 
applications, for example Plasma. If we have the API in a way that it makes 
async usage easy I think it would help a lot and sync usage is still possible: 
.waitForFinished().

Cheers
Martin

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel

Reply via email to