On 06/13/2017 03:00 PM, Dirkjan Ochtman wrote:
On Jun 13, 2017 11:55, "Nicolas B. Pierron" <nicolas.b.pier...@mozilla.com>
wrote:

The JavaScript Start-up Bytecode Cacheā° is a project which aims at reducing
the page load time by recording the bytecode generated during the last
visits and by-pass the JavaScript parser.


So this is about content JS only?

Yes, this is for the Content JS only, unless we are using the script loader as well for Gecko resources.

Has anyone thought about doing similar
things for chrome JS?

Yes, and this is already the case for some XUL functions.

Also, if we want to do that for chrome resources, then I wonder how many functions are unused during the start-up of Firefox?
 - If only a few are unused, then we might just store the complete bytecode.
 - If a lot remain unused, then we might do the same as here.

Also, the chrome files are stored in the jar file (If I recall correctly), and we might want to generate the bytecode ahead of time, such that users don't have to go through the encoding-phase.

It would seem like that would actually be easier
(since it's known to be immutable)?

The Alternate Data interface is good to abstract over the eviction conditions. So, from the ScriptLoader point of view, this is exactly as-if we are manipulating immutable scripts.

--
Nicolas B. Pierron
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to