mozilla / memchaser

Firefox extension to chase the memory usage and garbage collector activity
https://wiki.mozilla.org/QA/Automation_Services/Projects/Addons/MemChaser
29 stars 23 forks source link

Add indicator for ghost windows to frame #129

Open whimboo opened 12 years ago

whimboo commented 12 years ago

With the both bugs fixed we could have an indicator for ghost windows in the widget:

https://bugzilla.mozilla.org/show_bug.cgi?id=738624 - Add ghost windows to about:compartments https://bugzilla.mozilla.org/show_bug.cgi?id=738011 - Add ghost windows to about:memory

@jlebar, would you mind giving us some more background on it? I assume those entries are zombie compartments across all the opened windows and not only the current one, right?

jlebar commented 12 years ago

Please have a look at the ghost windows section of http://blog.mozilla.com/nnethercote/2012/04/04/memshrink-progress-week-42/

I assume those entries are zombie compartments across all the opened windows and not only the current one, right?

Sorry, I don't know what you mean. Could you rephrase that?

whimboo commented 12 years ago

Seems like I missed a part on that blog post. It's clear now. So it's for real ChromeWindows and not content DOMWindows.

jlebar commented 12 years ago

So it's for real ChromeWindows and not content DOMWindows.

I don't know exactly what you mean, but I don't think it's correct. Chrome windows usually don't show up as ghost windows...

A ghost window is a likely leak. There may be leaked windows which aren't ghosts, and there may be ghosts which aren't leaks.

whimboo commented 12 years ago

I don't know exactly what you mean, but I don't think it's correct. Chrome windows usually don't show up as ghost windows...

With ChromeWindow I meant the top-level windows which is visible as real windows to the user. That means a ghost window correlates to tab's content window?

jlebar commented 12 years ago

That means a ghost window correlates to tab's content window?

Yes, a ghost window is usually created from content, like http://facebook.com.

A ghost window may be from a top-level content window -- corresponding to the URL in the address bar -- or it may be from an iframe or popup window.

whimboo commented 12 years ago

Alright. So one last question: It doesn't matter how many top-level windows and tabs in each you have open, the number of ghost windows shown will span over all of those top-level windows, right?

jlebar commented 12 years ago

Alright. So one last question: It doesn't matter how many top-level windows and tabs in each you have open, the number of ghost windows shown will span over all of those top-level windows, right?

Yes, ghost windows are a truly global count.

xabolcs commented 9 years ago

FYI, from #223.

@amccreight commented 5 hours ago

... I'm not sure if it is possible right now for an addon to check these easily, but it should be easy to add something to Firefox to allow that.

xabolcs commented 9 years ago

FYI.

var memSrv = Components.classes["@mozilla.org/memory-reporter-manager;1"].getService(Components.interfaces.nsIMemoryReporterManager);
> undefined
memSrv.ghostWindows;
> 0
amccreight commented 9 years ago

Great, thanks for looking that up!