[webkit-reviews] review denied: [Bug 22747] unbounded growth in the cache due to resource overhead : [Attachment 25868] patch to set minimum resource size in cache
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Dec 8 21:40:06 PST 2008
Sam Weinig <sam at webkit.org> has denied Stephanie Lewis <slewis at apple.com>'s
request for review:
Bug 22747: unbounded growth in the cache due to resource overhead
https://bugs.webkit.org/show_bug.cgi?id=22747
Attachment 25868: patch to set minimum resource size in cache
https://bugs.webkit.org/attachment.cgi?id=25868&action=review
------- Additional Comments from Sam Weinig <sam at webkit.org>
> +unsigned CachedResource::overheadSize() {
The { needs to go on the next line.
> +
> + // FIXME: Find some programmatic lighweight way to calculate response
size, and size of the different CachedResource classes.
> + // This is a rough estimate of resource overhead based on stats
collected from the stress test.
> + return (sizeof(CachedResource) + 192 + // average size of m_url.
> + 896 * 2 + // average size of
ResourceResponse. Doubled to account for the WebCore copy and the WebKit copy.
> + // Mostly due to the Header Map
and URL.
> + 896 + // CFNetwork overhead from
reading and parsing the headers.
> + 256 * 2 + // Overhead from
ResourceRequest, doubled to account for WebCore copy and WebKit copy.
> + // Mostly due to the URL and
Header Map.
> + 148); // Round up to 4.0KB.
As discussed, let's at least programatically get the sizes for the URL and the
ResourceResponse and only apply a multiplier as a last resort. Also, have you
filed bugs on the 2 copies of the ResourceResponse and ResourceRequest
(WebCore/WebKit)? If so, please put a note in the source with the bug number.
More information about the webkit-reviews
mailing list