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 < wrote:

> The JS engine now supports allocating multiple global objects (also known
> as "realms") in a single compartment [0]. We are working on using this
> mechanism for our chrome code (one compartment for most of our
> system-principal sandboxes [1] and windows [2]). 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
> [0]
> [1]
> [2]
> _______________________________________________
> dev-platform mailing list
dev-platform mailing list

Reply via email to