Plasma and caching…

February 13, 2009

Andreas and me are actually working on improvements on how QGraphicsView handles the caching. Of course we have some test-applications to validate our work but Plasma provide us a pretty good real use case. Here is a screenshot that we took on Plasma using a small trick to see what is cached and what is not cached.

In red, NoCache mode. Green or blue show items that are cached (green is DeviceCoordinate, blue is ItemCoordinateCache).

plasmacache1

It seems that the caching in Plasma can be improved. :D

9 Responses to “Plasma and caching…”

  1. jospoortvliet said

    interesting picture ;-)

    Is it up to applet authors to improve caching, should it be in Qt or in Plasmalib? I also wonder to what extend it is efficient, with current fast processors and stuff…

  2. jamboarder said

    This is an odd result since every SVG used by Plasma::Theme is cached in a KPixmapCache. That would include many of the areas that seem to be painted in red in your pic. In fact even the rects of the painted SVGs are cached. I know because I had a bear-of-a-time running down stale cache problems in 4.2 that occurred due to theme changes.

    How are you determining what’s cached and what’s not cached?

  3. darktears said

    Yes only background i agree. But the content is not. To determine what is cached or not i “patch” the QGraphicsView to display what item use which cache flag provided by the QGV.

    Let’s say you move the calendar, actually i agree that the background of the applet will be read from the cache but the content will be repaint calling the paint method on it, which will trigger some repaints and computation to draw all boxes and so. If you use QGV flags then moving it will only draw the screenshot we took of that guy. Especially with DeviceCoordinate since applets can be rotate.

  4. jamboarder said

    Ahh, I see what you mean now. Thanks for explaining. :-)

  5. darktears said

    You’re welcome that was the goal of my post :D

  6. Richard Moore said

    Making the cache display mode available via another magic environment variable might be useful.

  7. Chaz6 said

    I look forward to some improvements because running KDE with xrdp (remote desktop) is quite slow because of this.

  8. Mike said

    Just passing by.Btw, you website have great content!

    _________________________________
    Making Money $150 An Hour

  9. Andreas said

    The comment above from “Mike” is spam.

Leave a Reply