Add an about:config preference to toggle the various eager delazification strategies.
Categories
(Core :: JavaScript Engine, task, P1)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox99 | --- | fixed |
People
(Reporter: nbp, Assigned: nbp)
References
(Blocks 1 open bug)
Details
Attachments
(3 files)
Eager delazification generates the bytecode of function off-thread while either waiting for other resources or executing the JavaScript code which is already delazified.
We have different strategies to order or skip functions for which we would be generating bytecode. We need to evaluate which order and filtering methods are the best for the web by being able to toggle between different strategies.
To toggle between different strategies, we need a flag which can easily be changed for A/B testing.
| Assignee | ||
Comment 1•3 years ago
|
||
This patch changes the way we parse JavaScript coming from Necko while loading
web pages, by adding an about:config flag named
javascript.options.delazification.strategy which is used to select between:
0 - On Demand
1 - Concurrent Depth First
255 - Parse Everything Eagerly
Previously, we moved from On-demand delazification, to parsing everything
eagerly to improve responsiveness of the browser, but we knew that more room for
optimization exists.
This toogle is meant to explore the space of delazification strategies, such
that we can parse functions of JavaScript files on an helper thread, while the
JavaScript file is being executed on the main thread. The space of
delazification strategies goes from ordering the order in which functions are
processed, as well as filtering functions which are processed. Not all functions
have to be delazified, and if the main thread needs a function which is not
parsed yet, it will fallback to parsing it on-demand.
| Assignee | ||
Comment 2•3 years ago
|
||
| Assignee | ||
Comment 3•3 years ago
|
||
Comment 5•3 years ago
|
||
Backed out 3 changesets (Bug 1753709) for causing build bustages on ScriptLoader.cpp.
Backout link
Push with failures
Failure Log
| Assignee | ||
Updated•3 years ago
|
Comment 7•3 years ago
|
||
Backed out 3 changesets (Bug 1753709) for causing build bustages on ScriptLoader.cpp.
Backout link
Push with failures
Failure Log
| Assignee | ||
Updated•3 years ago
|
Comment 9•3 years ago
|
||
Backed out for causing mochitest failures on test_delazification_strategy.html
- Backout link
- Push with failures
- Failure Log
- Failure line: TEST-UNEXPECTED-FAIL | dom/base/test/test_delazification_strategy.html | Test timed out. - Test timed out.
Comment 10•3 years ago
|
||
| Assignee | ||
Comment 11•3 years ago
|
||
(In reply to Cristian Tuns from comment #9)
Backed out for causing mochitest failures on test_delazification_strategy.html
- Backout link
- Push with failures
- Failure Log
- Failure line: TEST-UNEXPECTED-FAIL | dom/base/test/test_delazification_strategy.html | Test timed out. - Test timed out.
The problem was caused by a failure to capture the event sent to the script tag while loading the script.
Strangely, I do not know why this would fail on this test case and not on test_script_loader_js_cache.html, from which this test case was derived.
Mean while the solution taken, thanks to Arai, was to load the page without any script tag and dynamically add a script tag once the iframe is loaded, and event listeners are attached to the iframe window.
Comment 12•3 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/1ba642f524eb
https://hg.mozilla.org/mozilla-central/rev/c4b3ea8cc850
https://hg.mozilla.org/mozilla-central/rev/92c286a2adf9
Description
•