[Webkit-unassigned] [Bug 106842] adding support for DiscardablePixelRef for caching lazily decoded images

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jan 25 13:41:28 PST 2013


https://bugs.webkit.org/show_bug.cgi?id=106842





--- Comment #55 from Min Qin <qinmin at chromium.org>  2013-01-25 13:43:22 PST ---
(In reply to comment #54)
> (In reply to comment #53)
> > (In reply to comment #52)
> > > (From update of attachment 184799 [details] [details] [details])
> > > View in context: https://bugs.webkit.org/attachment.cgi?id=184799&action=review
> > > 
> > > > Source/WebKit/chromium/public/WebSettings.h:97
> > > > +    virtual void setDiscardableMemoryEntryLimit(int) = 0;
> > > > +    virtual void setDiscardableMemoryLimitMB(int) = 0;
> > > 
> > > Nat's right, you don't need this stuff
> > 
> > But we dont know how much memory we have allocated and how many files we have allocated, only the cache knows
> 
> What is "we" in this sentence?  The ImageDecodingStore knows exactly how much memory it has allocated from different sources at all times.

Yes, Imagedecodingstore know that, as long as they are not evicted. And don't forget partially decoded images, they are locked and in the cache. So if you have allow infinite number of entries, the cache will be filled with partially decoded images as they are locked and won't get purged

> 
> > 
> > If we put it in DiscardableMemory, then we need to introduce a static variable there to remember the allocated entries and total memory, is that what you guys want?
> 
> The question is which system is responsible for making policy decisions.  Do you want to limit how much ashmem is used on platforms that support it?  If so, what limits do you want to have and how do you want them enforced?

There is a file descriptor limit of 1024, we currently use 128 in this case. 
Grace said don't use more than 1G of ashmem memory.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list