Minutes Monday Plasma hangout

David Edmundson david at davidedmundson.co.uk
Wed Feb 19 21:24:41 UTC 2014

On Wed, Feb 19, 2014 at 9:12 PM, David Edmundson
<david at davidedmundson.co.uk> wrote:
>> no, one needs the QImage to load the data into the QSGTexture (you don't want
>> to use the FBO for that). Of course it should be fine to create the QImage on
>> the stack and discard it once it's loaded into the QSGTexture and I assume
>> David is doing exactly that.
> It doesn't quite get discarded.
> Plasma::Svg keeps a copy all of the images it doles out in a cache at
> different sizes. It kinda makes sense, but is also partly the source
> of our high memory.
> Because QImage is implicitly shared it should at least be the same
> underlying image in both the cache and here, which is good. Even
> better because both QSGTexture are created as copies of the same
> QImage from the cache it should be the same underlying QImage data
> between the two QSGTextures.

As Martin G has very annoyingly pointed out to me, what I said above
is mostly bogus.

Because image caches are stored in KLocalImageCacheImplementation
which shares memory between apps. This means that the QImage gets
serialised and deserealised; which means there can be no implicit
sharing of the object's data within our local app :(

My benchmarking showed a massive saving, because everything was shared
from the precache-cache (ThemePrivate::pixmapsToCache) but the real
plasma-desktop only had a saving of 7Mb (still a step in the right
direction, but not very impressive)

I can't think of any good solution for this :(.


More information about the Plasma-devel mailing list