11 points · by shawndumas · 15y ago · 11 comments
If your machine isn't swapping, then any unused memory is wasted. Better to keep all sorts of speculatively cached data. For a web browser that includes downloaded resources, but it could also include the rendered bitmaps of page fragments, preparsed documents, or any manner of partial computation that may be reused later. Once there is memory pressure the code can start dropping these things.
Why even post this if you're not going to investigate aside from extension disabling roulette?
A modern browser will gobble memory. But it will also get paged out to disk when necessary, and that's not such a terrible thing.
I think it's a mistake to equate 4 tabs with 4 web pages worth of content. Each tab actually represents a list of web pages that corresponds to that tab's history, and each element in that list is actually the root of a tree of resources needed for each of those pages, and if the user uses the back button, they often do not want to merely return to the page as it would be fetched by the request, but they also want to return to the state of the DOM as it was when they were just there, such as the state of a form they were entering. With the swipe-to-go-back interface, the previous page needs to be available pretty fast to make the UI responsive to this gesture.
This smells more like a cache to me than a leak.
Every web browser I've ever used eventually needed to be quit and restarted to clear out it's memory leaks.
At home on my later model MBP w/8GB and Lion it's not even noticeable.