Closed
Bug 1143809
Opened 10 years ago
Closed 10 years ago
memory leak when changing background images continuously via javascript
Categories
(Firefox :: Untriaged, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 1042393
People
(Reporter: web, Unassigned)
Details
(Keywords: testcase, Whiteboard: [MemShrink])
Attachments
(1 file)
(deleted),
text/html
|
Details |
User Agent: Mozilla/5.0 (Windows NT 6.1; rv:36.0) Gecko/20100101 Firefox/36.0
Build ID: 20150305021524
Steps to reproduce:
I use a javascript statement like this to display (larger) images:
this.display.style.backgroundImage = 'url(\'' + imageUrl + '\')';
In combination with window.setTimeout this is used as a slide show.
(Advantage: with css "background-size: contain" I don't have to care about image proportions)
Actual results:
With each background change firefox memory usage increases substantially - even if images have been shown already. Reaches about a Giga.
After a while images are not displayed anymore.
Console log says Images corrupted / truncated.
Firefox does free Memory when switching tabs inbetween.
Firefox 36.0.1
Windows 7 ultimate 32 Bit Service Pack 1
Expected results:
Memory must be freed continuously without having to switch tabs inbetween.
(Chrome, IE do not increase memory usage, opera does, but obviously applies a garbage collection every once in a while)
Could you attach a testcase to show the issue up, please?
In addition, if you're able to reproduce the issue with a fresh profile (see https://support.mozilla.org/en-US/kb/profile-manager-create-and-remove-firefox-profiles), could you save and attach a memory log from the page about:memory.
Flags: needinfo?(web)
Keywords: testcase-wanted
FF keeps in memory all the decoded images, so that's why the memory use is growing up fastly. Is it by purpose?
Keywords: testcase-wanted → testcase
Whiteboard: [MemShrink]
Comment 6•10 years ago
|
||
For background images (and other CSS images) we currently don't make any attempt to get rid of images that might be unused. We have bug 1042393 for this.
Flags: needinfo?(tnikkel)
Updated•10 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•