Move ScriptSource XDR-encoding to the linearize step of Stencil-XDR
Categories
(Core :: JavaScript Engine, task, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox86 | --- | fixed |
People
(Reporter: tcampbell, Assigned: tcampbell)
References
(Blocks 1 open bug)
Details
Attachments
(5 files)
When encoding a script for the bytecode cache in incremental mode, we currently transcode the ScriptSource in the initial encoding. This work is done on main-thread, during page load.
Another consequence, is that since this is so early, there is rarely a chance for source compression to have taken effect (which the transcoder supports) and we end up with larger cache files and more time in IPC and I/O.
Since the incremental encoder is associated with a ScriptSource, it will still always be available to us during the linearize step. We can instead perform the encoding of scriptsource here which has numerous benefits.
- ScriptSources have more opportunities to compress
- Duplicate copies of source aren't kept in memory during page load
- If encoding is aborted before saved to cache, the scriptsource encoding is also avoided.
Assignee | ||
Comment 1•4 years ago
|
||
Instead of transcoding the ScriptSource immediately when the
incremental-encoder is started, we should defer until the 'linearize' step
which still has access to the ScriptSource. This moves work from page-load to
idle, and gives the GC a chance to compress the source and reduce XDR size
(and thus IPC and I/O time).
Assignee | ||
Comment 2•4 years ago
|
||
Assignee | ||
Comment 3•4 years ago
|
||
Depends on D102231
Assignee | ||
Comment 4•4 years ago
|
||
Depends on D102214
Updated•4 years ago
|
Assignee | ||
Comment 5•4 years ago
|
||
After some experimentation, it seems that source compression still occurs much later. Regardless, I think the patches will simply some code and more work out of page load, so I'll clean them up for review.
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Comment 6•4 years ago
|
||
Depends on D102233
Comment 8•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/1e7377b38967
https://hg.mozilla.org/mozilla-central/rev/c67b08bb068a
https://hg.mozilla.org/mozilla-central/rev/170807435f02
https://hg.mozilla.org/mozilla-central/rev/913817e57a91
https://hg.mozilla.org/mozilla-central/rev/5f941b574274
Description
•