Review Request 119425: Cache the textures created for the fast path

Aleix Pol Gonzalez aleixpol at kde.org
Thu Jul 24 00:44:26 UTC 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/119425/
-----------------------------------------------------------

(Updated July 24, 2014, 12:44 a.m.)


Review request for Plasma.


Changes
-------

After reading through the changes, I realized it was not correct. We want to include in the cache the different themes. I know it sounds weird, but svg allows to have different plasma themes in use at the same time, so color schemes and device pixel ratio.

I did make the singleton class and we listen to the application palette to clear the cache. It might be clearing too much, but I don't think palette changes are that common anyway.


Repository: plasma-framework


Description
-------

Create a cache that has pointers to all the textures that we've generated, so in case we have one already created, we can re-use it.


Diffs (updated)
-----

  src/declarativeimports/core/framesvgitem.cpp 323b06b 
  src/declarativeimports/core/iconitem.cpp 38012cc 
  src/declarativeimports/core/svgitem.cpp eccff55 
  src/declarativeimports/core/svgtexturenode.h 21b9b2f 

Diff: https://git.reviewboard.kde.org/r/119425/diff/


Testing
-------

see the qDebug (to be removed before commit). 

plasmashell 2> out
$ grep s_cache out | grep ": miss" | wc -l
342
$ grep s_cache out | grep ": hit" | wc -l
126

So still having 3 times more hits than miss, so there's big room for improvement. Good news is that with this, we get a ~25% of memory and bandwidth save, in a per-item basis.


Thanks,

Aleix Pol Gonzalez

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20140724/2fc6193c/attachment.html>


More information about the Plasma-devel mailing list