Review Request: Analog clock painting performance

Aaron J. Seigo aseigo at kde.org
Mon Dec 1 00:53:22 CET 2008


On Sunday 30 November 2008, you wrote:
> > On 2008-11-30 09:01:20, Aaron Seigo wrote:
> > > hm. that seems a little suspect to me, but if grabbing the cached rects
> > > is really that slow, then Theme::findInRectsCache is probably what
> > > needs to be optimized.
> > >
> > > can you post the cachegrind output somewhere, along with the clock
> > > configuration you used?
>
> It's not that it is very slow, it's that it was called 13 times for each
> update. Quite a bit of overhead when you have the m_fancyHands enabled!
>
> http://aboyer.dyndns.org/kde/callgrind.out.before
> http://aboyer.dyndns.org/kde/callgrind.out.after

hm .. indeed .. does the attached patch help with this? if so, this would get 
us this optimization for all uses of Plasma::Svg at the cost of a little extra 
memory overhead.

looking at the callgrind output it looks like that the key is to try and avoid 
hitting KConfigGroup::readEntry.

> >From the comments below, I guess the moral of the story is not to assume
> > that the elements are properly positioned in the svg file. These changes
> > now become pretty useless. I'll try to reduce the amount of actual
> > painting instead of caching the rects.

yeah, trying to reduce the painting will be the big win.

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Qt Software

-------------- next part --------------
A non-text attachment was scrubbed...
Name: localSvgRectCache.diff
Type: text/x-patch
Size: 1553 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20081130/7c92ab01/attachment.diff 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20081130/7c92ab01/attachment.sig 


More information about the Plasma-devel mailing list