[Webkit-unassigned] [Bug 49008] Unbounded memory growth for long lived pages with many requests

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Nov 5 12:48:43 PDT 2010


--- Comment #19 from Sam Magnuson <smagnuson at netflix.com>  2010-11-05 12:48:42 PST ---
(In reply to comment #11)
> Please combine the patches for a single patch for readability.

Ok. I thought it might be nice to have the subcache mods in separate patches to discuss the merit of using the data structure in each place but I'll merge together into a single patch for this review.

> There shouldn't be any unbounded growth. The memory cache has a maximum size which will eventually be reached. At that point unreferenced items will be kicked out. You will fill the cache in any sufficiently long browsing session too so this is nothing particularly alarming. It would be useful to try to recognize resources that are unlikely to be referenced ever again and kick them out early. Doing that well is difficult.

This doesn't really augment the in-memory cache. This is to add a datastructure (called SubCache at the moment) which is a subset of the in-memory cache. It only references them by keyname (url) and when they get evicted from the global in-memory cache they fall out of the SubCache. WebKit has the pattern in a number of places to remember a set of url's (a HashSet) that it has seen before and the growth of that map is unbounded. In my tests I have a number of unique url's that each get book-kept and thus the memory continues to grow. Using the SubCache caps those to only things in the Cache which at least leaves a single place to tune memory requirements.

> I don't understand how these patches solve the problem, neither from description nor from looking at the code.

Hopefully this is more clear.

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