Bug 21736

Summary: Long-dead decoded image data make up for most of the object cache's memory use over time
Product: WebKit Reporter: mitz
Component: Page LoadingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Attachments:
Description Flags
Destroy decoded image data that has been dead for one minute sam: review+

mitz
Reported 2008-10-18 17:14:20 PDT
The decoded data of cached images that have been "dead" for over a minute often make up for most of the WebCore object cache's memory use over time. The likelihood of a long-dead image's decoded data to be accessed again is typically very low.
Attachments
Destroy decoded image data that has been dead for one minute (9.55 KB, patch)
2008-10-18 17:30 PDT, mitz
sam: review+
mitz
Comment 1 2008-10-18 17:30:59 PDT
Created attachment 24495 [details] Destroy decoded image data that has been dead for one minute This is the most straightforward patch, I think. The cost of an extra timer in each CachedImage appears to be negligible, and managing a queue with a single timer in the Cache turned out to be more complicated and had no significant benefit. Likewise, adding an intermediate subclass ("CachedObjectWithDecodedDataThatDestroysItselfOnATimer") between CachedObject and CachedImage seemed unnecessary for as long as images are the only objects with decoded data.
Sam Weinig
Comment 2 2008-10-18 19:49:42 PDT
Comment on attachment 24495 [details] Destroy decoded image data that has been dead for one minute r=me! So hot!
mitz
Comment 3 2008-10-18 19:54:25 PDT
Note You need to log in before you can comment on or make changes to this bug.