----- Original Message -----
> From: "Bobby Holley" <bobbyhol...@gmail.com>
> To: "Benjamin Smedberg" <benja...@smedbergs.us>
> Cc: "dev-platform" <dev-platform@lists.mozilla.org>, "Nicholas Nethercote" 
> <n.netherc...@gmail.com>
> Sent: Friday, March 21, 2014 8:02:58 AM
> Subject: Re: Too many system compartments at start-up
> 
> I'm also curious to hear about the overhead of compartments now that we
> have zones. I was under the impression that most of it was CCW overhead,
> which shouldn't really be an issue in the startup case, since we should
> have very few wrappers.

As far as I know, we haven't done any measurements of compartment overhead 
since zones landed (bug 759585). The whole point of zones was that people 
shouldn't have to merge compartments just to save memory, so I hope people 
don't start doing that without any data. All of the measurements in bug 986323 
simply say that we're loading a lot more code now than we were before. No 
amount of merging compartments will fix that.

The problem with doing measurements is that the per-compartment overhead is 
very dependent on what's going on in the compartment. I tried to enable the B2G 
compartment merging stuff in desktop Firefox to get a sense of how much of a 
change there would be [1]. It's hard to tell if it actually saved anything. It 
broke a lot of stuff, and I had a hard time getting consistent measurements of 
memory use at startup since the numbers really fluctuate wildly. My best guess 
is that explicit went from 90MB currently to 70MB with merging. That's a lot, 
but keep in mind that a bunch of exceptions are thrown all over the place, and 
we might just be failing to load some important stuff. Hopefully someone can 
follow up on this.

-Bill

[1] You have to make this code run unconditionally: 
http://mxr.mozilla.org/mozilla-central/source/js/xpconnect/loader/mozJSComponentLoader.cpp#354
The jsloader.reuseGlobal preference doesn't work because we haven't read in 
prefs yet.
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to