[Panel-devel] [PATCH] QPixmapCache size (bug 151109)

Sean Harmer sh at theharmers.co.uk
Wed Oct 24 18:06:56 CEST 2007


Hi Siraj,

On Wednesday 24 October 2007, Siraj Razick wrote:
> > I think that could work as long as we are careful to flush unneeded items
> > from the cache so that it doesn't grow indefinitely.
>
> Qt DOSE this automatically  :-) , deletes the unwanted that is, so why
> should we require a manual flush ? .
OK I see now. I've just read the docs to QCache and friends. :-)

> when the limit is full the insert will return false. so if needed we
> could expand the size of the cache further . but still keeping the
> size at a reasonable max so that
> we will not have the system threshing. So 2 max limits.  1 the current
> maximum of our cache ,  and the maximum value we will let the cache to
> grow. this is my suggestion ;)
I'm not even sure we need anything that complex. From the Qt docs it looks 
like the cache doesn't reserve the memory upfront, but only allocates it when 
objects are added to the cache (up to the limit of course).

So the trick will be to determine what the limit should be. For this I need to 
dig deeper into the plasma code...

I'll try some options when I get some time (this weekend hopefully).

Cheers,

Sean

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the Panel-devel mailing list