From kde-panel-devel Mon Mar 26 16:11:01 2012 From: =?ISO-8859-2?Q?=A3ukasz_Olender?= Date: Mon, 26 Mar 2012 16:11:01 +0000 To: kde-panel-devel Subject: Re: GSoC Plasmoid Initialization Message-Id: X-MARC-Message: https://marc.info/?l=kde-panel-devel&m=133277835110460 2012/3/25 Aaron J. Seigo : > On Tuesday, March 20, 2012 09:58:14 =C5 ukasz Olender wrote: >> Simply I'll start from implementing Applet::init() method asynchronously >> and take care if nothing goes wrong. If something bad will happen, I will > > i am skeptical that threading can be used here. one example: painting may= be > triggered during init(), and that must be in the main thread. this projec= t is > not really about threading as much as it is about delaying the initializa= tion > of the applets and returning to the event loop between initializations. Now I think it's clear to me. I can use QTimer which will invoke another init() methods after all events in events queue have been processed. Is this what you mean? I also have an additional idea which would be interesting to research. I could implement invoking Plasmoids initialization functions in order according to theirs priority and initialization time. For example important widgets will be always initialized first, then various user's widgets which have small initialization time and at the end widgets which need more time to start up. The time measurement can be performed every time when Plasmoid is initialized (I think it won't be much expensive). After loading all those times can be saved somewhere and have an impact on Plasmoids initialization order at next Plasma startup. Do you think it's worth effort? 2012/3/26 Aaron J. Seigo : > one thing that would be helpful is to look at the init() methods of vario= us > applets which take a long time to load and measure where that time is bei= ng > spent to see if there are common patterns that can then be used as > optimization targets. > I will enjoy to check it and optimize when it will be possible. Maybe there will be a possibility to move some code into another thread, but as you say I must deeply look at it first; I'll also add it to proposal. Lukasz Olender _______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel