On Fri, Mar 21, 2014 at 5:00 PM, Nicholas Nethercote
<n.netherc...@gmail.com> wrote:
> On Fri, Mar 21, 2014 at 6:31 AM, Benjamin Smedberg
> <benja...@smedbergs.us> wrote:
>>
>> What is the per-compartment overhead?
>
> It's hard to pin an exact number on it.

I talked to Bill about this today, and the overhead includes:

- The JSCompartment object within SpiderMonkey.

- Some additional shapes.

- Cross-compartment wrapper objects and the table that holds them.

The first two are unlikely to be significant. The third one is usually
moderate (e.g. in my current session it's under 2 MiB for a 490 MiB JS
runtime), though it can get high if you have compartments with lots of
cross-links (gps had this problem in FHR and solved it by
concatenating multiple modules into one).

----

On a related note, I just noticed that in my current session a lot of
the system compartments appear twice or even more. Does anyone know
how this can happen? I only have one browser window open.

Nick


571 (100.0%) -- js-main-runtime-compartments
├──518 (90.72%) -- system
│  ├───18 (03.15%) ── [System Principal],
inProcessTabChildGlobal?ownedBy=chrome://browser/content/browser.xul
[18]
│  ├────6 (01.05%) ── [System Principal],
inProcessTabChildGlobal?ownedBy=data:application/vnd.mozilla.xul+xml;charset=utf-8,<window%20id='win'/>
[6]
│  ├────3 (00.53%) ── [System Principal], [anonymous sandbox] (from:
resource://gre/modules/XPIProvider.jsm ->
jar:file:///Users/njn/Library/Application%20Support/Firefox/Profiles/puna0zr8.new/extensions/jid1-xufzosoflzs...@jetpack.xpi!/bootstrap.js:264)
[3]
│  ├────3 (00.53%) ── [System Principal], about:blank [3]
│  ├────3 (00.53%) ── [System Principal],
chrome://browser/content/bookmarks/bookmarksPanel.xul [3]
│  ├────2 (00.35%) ── [System Principal], about:newtab [2]
│  ├────2 (00.35%) ── [System Principal],
about:treestyletab-group?title=Work%20Tools&temporary=true [2]
│  ├────2 (00.35%) ── [System Principal],
chrome://browser/content/baseMenuOverlay.xul [2]
│  ├────2 (00.35%) ── [System Principal],
chrome://browser/content/browser.xul [2]
│  ├────2 (00.35%) ── [System Principal],
chrome://browser/content/downloads/download.xml [2]
│  ├────2 (00.35%) ── [System Principal],
chrome://browser/content/macBrowserOverlay.xul [2]
│  ├────2 (00.35%) ── [System Principal],
chrome://browser/content/places/placesOverlay.xul [2]
│  ├────2 (00.35%) ── [System Principal],
chrome://browser/content/search/search.xml [2]
│  ├────2 (00.35%) ── [System Principal],
chrome://browser/content/socialchat.xml [2]
│  ├────2 (00.35%) ── [System Principal],
chrome://browser/content/tabbrowser.xml [2]
│  ├────2 (00.35%) ── [System Principal],
chrome://browser/content/urlbarBindings.xml [2]
│  ├────2 (00.35%) ── [System Principal],
chrome://chatzilla/content/browserOverlay.xul [2]
│  ├────2 (00.35%) ── [System Principal],
chrome://global/content/bindings/autocomplete.xml [2]
│  ├────2 (00.35%) ── [System Principal],
chrome://global/content/bindings/browser.xml [2]
│  ├────2 (00.35%) ── [System Principal],
chrome://global/content/bindings/button.xml [2]
│  ├────2 (00.35%) ── [System Principal],
chrome://global/content/bindings/general.xml [2]
│  ├────2 (00.35%) ── [System Principal],
chrome://global/content/bindings/listbox.xml [2]
│  ├────2 (00.35%) ── [System Principal],
chrome://global/content/bindings/menu.xml [2]
│  ├────2 (00.35%) ── [System Principal],
chrome://global/content/bindings/notification.xml [2]
│  ├────2 (00.35%) ── [System Principal],
chrome://global/content/bindings/popup.xml [2]
│  ├────2 (00.35%) ── [System Principal],
chrome://global/content/bindings/progressmeter.xml [2]
│  ├────2 (00.35%) ── [System Principal],
chrome://global/content/bindings/resizer.xml [2]
│  ├────2 (00.35%) ── [System Principal],
chrome://global/content/bindings/richlistbox.xml [2]
│  ├────2 (00.35%) ── [System Principal],
chrome://global/content/bindings/scrollbar.xml [2]
│  ├────2 (00.35%) ── [System Principal],
chrome://global/content/bindings/scrollbox.xml [2]
│  ├────2 (00.35%) ── [System Principal],
chrome://global/content/bindings/splitter.xml [2]
│  ├────2 (00.35%) ── [System Principal],
chrome://global/content/bindings/stringbundle.xml [2]
│  ├────2 (00.35%) ── [System Principal],
chrome://global/content/bindings/tabbox.xml [2]
│  ├────2 (00.35%) ── [System Principal],
chrome://global/content/bindings/text.xml [2]
│  ├────2 (00.35%) ── [System Principal],
chrome://global/content/bindings/textbox.xml [2]
│  ├────2 (00.35%) ── [System Principal],
chrome://global/content/bindings/toolbar.xml [2]
│  ├────2 (00.35%) ── [System Principal],
chrome://global/content/bindings/toolbarbutton.xml [2]
│  ├────2 (00.35%) ── [System Principal],
chrome://global/content/bindings/tree.xml [2]
│  ├────2 (00.35%) ── [System Principal],
chrome://global/content/editMenuOverlay.xul [2]
│  ├────2 (00.35%) ── [System Principal],
chrome://global/content/platformHTMLBindings.xml [2]
│  ├────2 (00.35%) ── [System Principal],
chrome://masspasswordreset/content/firefoxOverlay.xul [2]
│  ├────2 (00.35%) ── [System Principal],
chrome://treestyletab/content/base-toolbar-binding.xml [2]
│  ├────2 (00.35%) ── [System Principal],
chrome://treestyletab/content/res/bookmarkMultipleTabs.xul [2]
│  ├────2 (00.35%) ── [System Principal],
chrome://treestyletab/content/treestyletab.xml [2]
│  ├────2 (00.35%) ── [System Principal],
chrome://treestyletab/content/treestyletab.xul [2]
│  ├────2 (00.35%) ── [System Principal],
resource://gre/modules/commonjs/sdk/core/heritage.js (from:
resource://gre/modules/XPIProvider.jsm ->
jar:file:///Users/njn/Library/Application%20Support/Firefox/Profiles/puna0zr8.new/extensions/jid1-xufzosoflzs...@jetpack.xpi!/bootstrap.js
-> resource://gre/modules/commonjs/toolkit/loader.js:213) [2]
│  ├────2 (00.35%) ── [System Principal],
resource://gre/modules/commonjs/sdk/system/events.js (from:
resource://gre/modules/XPIProvider.jsm ->
jar:file:///Users/njn/Library/Application%20Support/Firefox/Profiles/puna0zr8.new/extensions/jid1-xufzosoflzs...@jetpack.xpi!/bootstrap.js
-> resource://gre/modules/commonjs/toolkit/loader.js:213) [2]
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to