Closed Bug 574919 Opened 15 years ago Closed 15 years ago

Memory from images on active pages not pruned

Categories

(Firefox :: General, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 563088

People

(Reporter: adam, Unassigned)

References

()

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.4) Gecko/20100611 Firefox/3.6.4 (.NET CLR 3.5.30729) Build Identifier: Firefox 3.7alpha5 (32-bit) In previous builds including 3.6.4 (current beta) and 3.5, images are uncompressed, loaded into memory, but then eventually pruned in some way (down to what's needed to render what's on screen?). In 3.7alpha5, however, they are loaded into memory and then just stay there. In about:memory, all the memory dedicated to these images appropriately shows up in the images/active/uncompressed and gfx/win32/canvas (sorry if these are incorrect, I'm going from memory right now). I've read through almost all the bug reports regarding memory usage from uncompressed images (there are many) but none seem to do specifically with this regression from 3.x to 3.7alpha5. For instance, in 3.6.4, a thread on 4chan with roughly 100 jpegs ranging in (compressed) size from 200-800kb (from small resolution up to about 1600x1200) will bump the memory up by a small amount, and within seconds it will drop down to a minuscule addition from the previous working memory (maybe 10-100mb higher). In 3.7alpha5, the memory will jump up a large amount and never be pruned back down to a manageable size. As an example, I was viewing a single thread of the same size and it added roughly 800mb of memory consumption, bringing the working memory of FF to around a gigabyte, all from a single tab! I have tried changing many options (I use many tabs so in previous builds I became familiar with many variables related to memory consumption) including browser.sessionhistory.max_total_viewers, browser.cache.memory.enable, and even using the new Direct2D rendering method to no avail. I'm wondering what has changed from 3.6.4 to 3.7 that may have created this new behavior? Reproducible: Always Steps to Reproduce: 1. Visit a site with many large images, for instance a thread on 4chan with all images expanded or The Big Picture (http://www.boston.com/bigpicture/) 2. Watch your memory usage skyrocket in about:memory or the task manager. 3. Close the tab and see the memory remain in use. Actual Results: Disproportionate memory usage from a single image-intensive tab, lingering memory usage. Expected Results: Small increase in working memory from an image-intensive tab, memory freed upon closing said tab.
To be more specific, for a very clear example, navigate to The Big Picture (link in original bug report) and open all the linked galleries in new tabs. In 3.7alpha5 this bumped up my memory usage by about 900MB. Another easy way is to use any Greasemonkey script that can substitute thumbnails with their full-size sources, for instance on Google Image Search.
Upon further testing, it does appear that the excess memory is eventually freed after closing the offending tab, it just takes a while.
Further clarification, in about:memory the relevant memory usage locations are "images/content/used/uncompressed" and "gfx/surface/image". My exact build is: Mozilla/5.0 (Windows; U; Windows NT 6.1; WOW64; en-US; rv:1.9.3a5) Gecko/20100610 MozillaDeveloperPreview/3.7a5 (.NET CLR 3.5.30729)
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.