Review Request: Analog clock painting performance
Marco Martin
notmart at gmail.com
Sun Nov 30 17:04:47 CET 2008
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.vidsolbach.de/r/290/#review274
-----------------------------------------------------------
hmm, strage, because rects of svgs should be cached already (maybe kconfig is a bit dumb and tries to access from disk too often? not sure)
but if this makes the thing so faster yes, why not :)
now for the paint bottleneck i think the problem is the painter rotations that is totally software, so should be cached every freaking single possible hand rotation, ugh O.o
- Marco
On 2008-11-30 07:32:56, Alain Boyer wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.vidsolbach.de/r/290/
> -----------------------------------------------------------
>
> (Updated 2008-11-30 07:32:56)
>
>
> Review request for Plasma.
>
>
> Summary
> -------
>
> This patch attempts to speed up the analog clock painting performance. Essentially, it caches the QRects of the theme elements and streamlines some of the painting code.
>
> The speedup is explained below, however I think we can do even better. For example, we could draw the hour and minute hands and shadows to a pixmap and then use that when only the second hand needs an update. I'm not sure if this is the way to go? Comments or suggestions?
>
>
> Diffs
> -----
>
> /trunk/KDE/kdebase/workspace/plasma/applets/analog-clock/clock.h
> /trunk/KDE/kdebase/workspace/plasma/applets/analog-clock/clock.cpp
>
> Diff: http://reviewboard.vidsolbach.de/r/290/diff
>
>
> Testing
> -------
>
> Valgrind tells me that this patch introduces a 1.46 speedup to the drawHand() method. This contributes to a 1.40 speedup of paintInterface(). Not bad.
>
> Another way of looking at it, paintInterface() used to spend 63% of its time actually painting (m_theme->paint()). Now, paintInterface() spends 98% of its time painting. Hence, painting is now the bottleneck.
>
>
> Thanks,
>
> Alain
>
>
More information about the Plasma-devel
mailing list