Closed Bug 1155991 Opened 10 years ago Closed 5 years ago

Excessive memory usage on http://www.civilization.com/

Categories

(Core :: Graphics: ImageLib, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: martin, Unassigned)

References

(Depends on 1 open bug, )

Details

(Whiteboard: [gfx-noted])

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2374.0 Safari/537.36 Steps to reproduce: I visited the web page http://www.civilization.com/en/news/2015-04-systematic-destiny-part-1/ in Firefox Actual results: Noticed that memory use jumped from about 450 MB to about 1.8 G. There was lots of cpu use as well in the beginning and even some unresponsiveness. Expected results: Memory should not be that high and the page should not render the browser unresponsive. Opening the same page in Chrome shows an increase of about 250 MB of memory and no unresponsiveness. Same issue albeit less dramatically in Firefox Stable.
If you right-click page-info, you'll find the long list of images in the column on the right have not been scaled down to the size they're rendered at by the web designer. They're all 2000px wide images! This is a common web design mistake - and looks like a good test case for how image-caching could be improved? I don't know any details, but as a user I'd just pitch in that I'd prefer the code to optimise for memory over performance. (Since high memory usage ends up *becoming* the biggest system-wide performance issue.)
This issue is reproduced in version 40.0b3 on Windows 8.1 professional 32 bit with 4GB RAM. The page renders the web browser unresponsive at a point of time when the page is getting loaded. But it regains its position and starts responding again. This unresponsiveness typically happens in the middle of loading the page. But it does not go from 450 MB to 1.8 GB scale. In my case it went up from 215 MB to 550 MB. [testday-20150710]
Attached file about:memory
about:memory indeed shows images taking up memory. The page uses CSS to size the large JPEG images: > background-image: url("..."); > background-size: cover; Bug 1045926 and its dependencies are related, but I'm not sure what specific bug will fix this, so keeping this open for now.
BTW, I can reproduce on OS X 10.9 with the current Nightly.
Component: Untriaged → ImageLib
OS: Windows 7 → All
Product: Firefox → Core
Hardware: x86_64 → All
Version: 40 Branch → Trunk
As far as the memory usage goes, this depends specifically on bug 1151373. We're successfully downscaling these images in memory, but because we don't track the visibility of CSS images, we're unable to avoid storing a copy at the intrinsic size as well. The responsiveness issue seems totally unrelated to images, though. For some reason massive numbers of setTimeout handlers are being generated by this site, making it difficult for other code to run. Bringing in some folks more familiar with debugging content performance issues.
Depends on: 1151373
Flags: needinfo?(peterv)
Flags: needinfo?(bugs)
Summary: Huge Memory Jump on Page → Excessive memory usage on http://www.civilization.com/
Whiteboard: [gfx-noted]
Flags: needinfo?(bugs)

I think the page has gone away, we've changed our timeout handling quite a bit in the meantime so closing this (dependent bug 1151373 remains open).

Status: NEW → RESOLVED
Closed: 5 years ago
Flags: needinfo?(peterv)
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: