Plasma::Svg and performance

Aaron J. Seigo aseigo at kde.org
Wed Oct 15 18:32:06 CEST 2008


On Wednesday 15 October 2008, Jamboarder wrote:
> > From: Aaron J. Seigo <aseigo at kde.org>
> > one outstanding issue will be clearing the disk and parameter caches when
> > the theme is updated on disk but not changed in the config.
> >
> > before i go any further with this approach: any thoughts, ideas,
> > inspirations?
>
> It might be useful in general to scope out all the "persistent stores" of
> SVG related information and when they need to be cleared/refreshed. As far
> as I can tell, these "stores" currently include:
> - Plasma::Svg QPixmapCache

replaced by Plasma::Theme's KPixmapCache

> - Plasma::Svg renderers (the shared svg renderer hash)

backstop to limit impact of actually creating renderers.

> - Plasma::PanelSvg QPixmapCache

should also be replaced by by Plasma::Theme's KPixmapCache

> - this new Plasma::Svg cache(s) for the hint and element parameters.

which should also probably move to Plasma::Theme

> The events that trigger a clear/refresh include:
> themeChanged (if the theme image path is different)
> colorsChanged (for svgs that have the apply colors hint)

these should cause global wipes of the caches, yes.

> setImagePath (if the path is different that the current one)

this only affects Plasma::SharedSvgRenderer usage, and is local to any given 
Plasma::Svg object.

> Should a clear/refresh be triggered if the path hasn't changed but the
> actual file has?

for correctness, yes. i don't think path changes happen often enough to worry 
about the cost of creating a QFileInfo (so as to get at the modification time), 
but that would also mean storing that mod time in the cache.

> Are there other events that should trigger a refresh?

installing a new set of files over the current theme at runtime. i think we can 
safely ignore that one and require a manual theme reset at that point.

> Is it worth consolidating the clearing/refresh of these "persistent stores"
> in one place (at least for Plasma:Svg)?

yes, in Plasma::Theme. why? it knows when the theme parameters change.

-- 
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: 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/20081015/cd6464d8/attachment.sig 


More information about the Plasma-devel mailing list