Bug 21736 - Long-dead decoded image data make up for most of the object cache's memory use over time
Summary: Long-dead decoded image data make up for most of the object cache's memory us...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-18 17:14 PDT by mitz
Modified: 2008-10-18 19:54 PDT (History)
0 users

See Also:


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+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mitz 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.
Comment 1 mitz 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.
Comment 2 Sam Weinig 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!
Comment 3 mitz 2008-10-18 19:54:25 PDT
Landed as <http://trac.webkit.org/changeset/37689>.