This project has been a tremendous amount of effort. It started some time around April last year, I think. This should help fix one of the major cases where Gecko's performance currently can suffer quite a lot compared to other engines on certain pages.
Thanks a lot for pushing things through to this point to everyone involved, especially Jason and Jan! On Tue, Dec 18, 2018, 2:52 PM Jan de Mooij <jdemo...@mozilla.com wrote: > The JS engine now supports allocating multiple global objects (also known > as "realms") in a single compartment . We are working on using this > mechanism for our chrome code (one compartment for most of our > system-principal sandboxes  and windows ). I'm hoping that part will > land relatively soon. After that we want to enable this for same-origin > content globals (like iframes) as well. This is the main goal of this work, > but it depends on some architectural changes that are still in flight. > > We are doing this to reduce cross-compartment wrapper overhead: globals > within a compartment can access each other directly, without any wrapper > overhead, and they can share wrappers into other compartments. Initial > results are promising; we are seeing performance improvements on various > talos tests and some memory usage improvements as well. > > What this means is that globals are no longer guaranteed to have their own > compartment. Instead of entering a compartment (JSAutoCompartment), code > should now enter a global/realm (JSAutoRealm). Note that JSAutoRealm cannot > be used with cross-compartment wrappers (there's a diagnostic assert for > this, because cross-compartment wrappers are now shared by all realms in > the compartment, so entering a wrapper's realm is kind of meaningless). > > Please keep this in mind when writing (test) code. Let me know if there are > any questions or concerns. > > Thanks, > Jan > >  https://bugzilla.mozilla.org/show_bug.cgi?id=1357862 >  https://bugzilla.mozilla.org/show_bug.cgi?id=1512029 >  https://bugzilla.mozilla.org/show_bug.cgi?id=1514210 > _______________________________________________ > dev-platform mailing list > firstname.lastname@example.org > https://lists.mozilla.org/listinfo/dev-platform > _______________________________________________ dev-platform mailing list email@example.com https://lists.mozilla.org/listinfo/dev-platform