Closed
Bug 730833
Opened 13 years ago
Closed 11 years ago
Opening and closing many windows causes Firefox to use more memory
Categories
(Core :: XUL, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: passfree, Unassigned)
Details
(Whiteboard: [MemShrink:P3])
Attachments
(1 file)
|
8.79 KB,
application/zip
|
Details |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.22 (KHTML, like Gecko) Chrome/19.0.1049.3 Safari/535.22
Steps to reproduce:
If you open a window via window.openDialog or window.open you will notice that it leaks a tiny amount of memory. If we repeat this test let's say 10,000 times this mounts to a lot of leaked data. Dumping the JS heap usually results into hundreds of references of ChromeWindow.
I have attached a simple xulrunner application which demonstrates the problem. Simply execute the application and wait for 3-4 minutes. While the application is running monitor its memory usage.
!!! NB: the application was tested on Snow Leopard.
Updated•13 years ago
|
Whiteboard: [MemShrink]
Updated•13 years ago
|
Whiteboard: [MemShrink] → [MemShrink:P3]
Updated•13 years ago
|
Attachment #600925 -
Attachment mime type: application/octet-stream → application/zpi
Updated•13 years ago
|
Attachment #600925 -
Attachment mime type: application/zpi → application/zip
Comment 1•13 years ago
|
||
This extension is doing
setInterval(function () {
openDialog('chrome://main/content/dialog.xul', '', 'chrome,modal,centerscreen', {a:1, b:2});
}, 1000);
and dialog.xul does
function handleDOMContentLoadedEvent(event) {
if (event.target != document) {
return;
}
window.close();
}
addEventListener('DOMContentLoaded', handleDOMContentLoadedEvent, false);
So we're opening *and closing* lots of windows.
> Dumping the JS heap usually results into hundreds of references of ChromeWindow.
It sounds like you're not running the GC before you measure memory usage (see the button at the bottom of about:memory). Either that, or the extension is somehow holding a reference to each of the windows it creates.
I seriously doubt this is exposing a real bug in Firefox, so I'm tempted to mark this bug as incomplete, but if you want to dig into it, we can...
Summary: opening windows leaks → Opening and closing many windows causes Firefox to use more memory
Comment 2•11 years ago
|
||
no response to comment 1, "I seriously doubt this is exposing a real bug in Firefox", so => invalid
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•