Open Bug 1306915 Opened 8 years ago Updated 2 years ago

This web page only in Firefox cause short duration huge memory use?

Categories

(Core :: Graphics: ImageLib, defect, P3)

45 Branch
x86
Linux
defect

Tracking

()

Tracking Status
firefox-esr52 - wontfix
firefox58 --- wontfix
firefox59 --- fix-optional
firefox60 --- fix-optional

People

(Reporter: hsrmxj78421, Assigned: aosmond)

Details

(Whiteboard: gfx-noted)

User Agent: Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Firefox/45.0
Build ID: 20160802213348

Steps to reproduce:

To the URL :http://www.weather.com.cn/live/





Actual results:

quick and huge memory used is occurr
In my 2G RAM and use ZRAM of Linux 4.5 
occasional occur OOM
3.16 no occur OOM ,but still with huge memory used is occur


Expected results:

I thank that should least as Chromium memory use range in 1MB~50MB approximate,but Firefox use too many memory than Chromium
OS: Unspecified → Linux
Hardware: Unspecified → x86
Product: Firefox → Core
Component: Untriaged → JavaScript Engine
Component: JavaScript Engine → Untriaged
Product: Core → Firefox
Component: Untriaged → JavaScript Engine
Product: Firefox → Core
can confirm that the page uses 1.6GB ram 
However, it reduces to ~950MB in a few seconds.
More information about that Bug:
Toggle to other tab will reduce memory used to near normal as approximate Chromium
Even if again toggle to this problem tab
(In reply to mayankleoboy1 from comment #1)
> can confirm that the page uses 1.6GB ram 
> However, it reduces to ~950MB in a few seconds.

~950MB not is normal case
I use the command "watch -n 1 free -m" to compare before and after
(In reply to hsrmxj78421 from comment #2)
> More information about that Bug:
> Toggle to other tab will reduce memory used to near normal as approximate
> Chromium
> Even if again toggle to this problem tab

This way not work for 49.0.1
Component: JavaScript Engine → Memory Allocator
Although disable JavaScript can reduce memory use in this case,but about:config showen that memory used by many huge size image file.
However,Chromium normal working for this page
Main contribution here is:

├────777,798,296 B (31.84%) -- images
│    ├──776,252,104 B (31.77%) -- content
│    │  ├──774,713,616 B (31.71%) -- raster
│    │  │  ├──774,713,328 B (31.71%) -- used
│    │  │  │  ├───31,338,640 B (01.28%) -- image(3000x2601, http://d1.weather.com.cn/newwebgis/radar/5m/QPFRef_201610120500.png)
│    │  │  │  │   ├──31,215,664 B (01.28%) ── locked/surface(3000x2601)/decoded-heap
│    │  │  │  │   └─────122,976 B (00.01%) ── source
│    │  │  │  ├───31,334,544 B (01.28%) -- image(3000x2601, http://d1.weather.com.cn/newwebgis/radar/5m/QPFRef_201610120300.png)
│    │  │  │  │   ├──31,215,664 B (01.28%) ── locked/surface(3000x2601)/decoded-heap
│    │  │  │  │   └─────118,880 B (00.00%) ── source
│    │  │  │  ├───31,334,544 B (01.28%) -- image(3000x2601, http://d1.weather.com.cn/newwebgis/radar/5m/QPFRef_201610120310.png)
│    │  │  │  │   ├──31,215,664 B (01.28%) ── locked/surface(3000x2601)/decoded-heap
│    │  │  │  │   └─────118,880 B (00.00%) ── source
│    │  │  │  ├───31,334,544 B (01.28%) -- image(3000x2601, http://d1.weather.com.cn/newwebgis/radar/5m/QPFRef_201610120320.png)
│    │  │  │  │   ├──31,215,664 B (01.28%) ── locked/surface(3000x2601)/decoded-heap
│    │  │  │  │   └─────118,880 B (00.00%) ── source
│    │  │  │  ├───31,334,544 B (01.28%) -- image(3000x2601, http://d1.weather.com.cn/newwebgis/radar/5m/QPFRef_201610120330.png)
│    │  │  │  │   ├──31,215,664 B (01.28%) ── locked/surface(3000x2601)/decoded-heap
│    │  │  │  │   └─────118,880 B (00.00%) ── source
│    │  │  │  ├───31,334,544 B (01.28%) -- image(3000x2601, http://d1.weather.com.cn/newwebgis/radar/5m/QPFRef_201610120340.png)
│    │  │  │  │   ├──31,215,664 B (01.28%) ── locked/surface(3000x2601)/decoded-heap
│    │  │  │  │   └─────118,880 B (00.00%) ── source
│    │  │  │  ├───31,334,544 B (01.28%) -- image(3000x2601, http://d1.weather.com.cn/newwebgis/radar/5m/QPFRef_201610120350.png)
│    │  │  │  │   ├──31,215,664 B (01.28%) ── locked/surface(3000x2601)/decoded-heap
│    │  │  │  │   └─────118,880 B (00.00%) ── source
│    │  │  │  ├───31,334,544 B (01.28%) -- image(3000x2601, http://d1.weather.com.cn/newwebgis/radar/5m/QPFRef_201610120400.png)
│    │  │  │  │   ├──31,215,664 B (01.28%) ── locked/surface(3000x2601)/decoded-heap
│    │  │  │  │   └─────118,880 B (00.00%) ── source
│    │  │  │  ├───31,334,544 B (01.28%) -- image(3000x2601, http://d1.weather.com.cn/newwebgis/radar/5m/QPFRef_201610120410.png)
│    │  │  │  │   ├──31,215,664 B (01.28%) ── locked/surface(3000x2601)/decoded-heap
│    │  │  │  │   └─────118,880 B (00.00%) ── source
│    │  │  │  ├───31,334,544 B (01.28%) -- image(3000x2601, http://d1.weather.com.cn/newwebgis/radar/5m/QPFRef_201610120420.png)
│    │  │  │  │   ├──31,215,664 B (01.28%) ── locked/surface(3000x2601)/decoded-heap
│    │  │  │  │   └─────118,880 B (00.00%) ── source
│    │  │  │  ├───31,334,544 B (01.28%) -- image(3000x2601, http://d1.weather.com.cn/newwebgis/radar/5m/QPFRef_201610120430.png)
│    │  │  │  │   ├──31,215,664 B (01.28%) ── locked/surface(3000x2601)/decoded-heap
│    │  │  │  │   └─────118,880 B (00.00%) ── source
│    │  │  │  ├───31,334,544 B (01.28%) -- image(3000x2601, http://d1.weather.com.cn/newwebgis/radar/5m/QPFRef_201610120440.png)
│    │  │  │  │   ├──31,215,664 B (01.28%) ── locked/surface(3000x2601)/decoded-heap
│    │  │  │  │   └─────118,880 B (00.00%) ── source
│    │  │  │  ├───31,334,544 B (01.28%) -- image(3000x2601, http://d1.weather.com.cn/newwebgis/radar/5m/QPFRef_201610120450.png)
│    │  │  │  │   ├──31,215,664 B (01.28%) ── locked/surface(3000x2601)/decoded-heap
│    │  │  │  │   └─────118,880 B (00.00%) ── source
(...)

I haven't looked at what the page actually does at the code level, but these are all the decoded images for all the rainfall radar overlays for all the times that can be showed through the slider and/or with the play button. They're very much larger than what is actually displayed, and it looks like we shouldn't be keeping so much of the decoded data around.

Moving to ImageLib because decoded-heap comes from imgLoader, but that might as well be caused by something upper in the stack.
Component: Memory Allocator → ImageLib
Assignee: nobody → aosmond
Priority: -- → P3
Whiteboard: gfx-noted
[Tracking Requested - why for this release]:This bug also existing on "Mozilla Firefox 52.3.0"
This issue is out of scope for the kinds of fixes we backport to the ESR release. Reporter, does this reproduce for you with Firefox 58 as well?
Flags: needinfo?(hsrmxj78421)
Can still reproduce on the latest nightly
Thanks for checking.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(hsrmxj78421)
The page is using flipping opacity between 0/1 on a series of images to do an image animation. We don't consider opacity when determining if an image is visible so all the images are considered visible. If the website used display:none instead the memory use problem would go away but would likely have another problem: we don't sync decode images so the animation would appear "flashy". The website very well might be using opacity to work around this. If we implemented the "decoding=sync" attribute for images that would give this website a way to fix this.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.