If my memory serves, B2G has its own implementation of Cu.import that
doesn't create components. Would it be possible to expose this
implementation to Firefox so that we could use it for some modules that
are designed to be always be imported together?

I would definitely use this for OS.File.

Similarly, I assume that a variant of Jetpack/devtools' require() that
doesn't create components would be useful for the 16 devtools compartments.

Cheers,
 David

On 3/21/14 7:46 AM, Nicholas Nethercote wrote:
> Hi,
> 
> At start-up, with a new profile, Firefox creates more than 230 system
> compartments. This is about 90 more than a year ago, and it's part of
> the reason why Firefox uses almost twice as much physical memory at
> start-up than it did two years ago. (Have a look at
> https://areweslimyet.com/ for the measurements.)
> 
> At the bottom of this email I have listed the system compartments.
> (You can generate this list yourself from the
> 'js-main-runtime-compartments' tree in about:memory.) Please look for
> any there that you know could be created lazily. For example, there
> are 16 that have "devtools" in the name, which sound unnecessary.
> 
> If you find some, please file a bug that blocks
> https://bugzilla.mozilla.org/show_bug.cgi?id=986323.
> 
> Also, while modularization is admirable, compartments aren't free. So
> if you see any compartments that could be merged easily, please
> consider doing that as well.
> 
> Thanks.
> 
> Nick


-- 
David Rajchenbach-Teller, PhD
 Performance Team, Mozilla
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to