package and ship already JIT'd chrome JavaScript
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
People
(Reporter: dietrich, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [snappy:p3][ts])
Reporter | ||
Updated•16 years ago
|
![]() |
||
Updated•16 years ago
|
Comment 2•16 years ago
|
||
Comment 3•16 years ago
|
||
Reporter | ||
Comment 4•16 years ago
|
||
![]() |
||
Comment 5•15 years ago
|
||
Comment 6•15 years ago
|
||
Comment 7•14 years ago
|
||
Reporter | ||
Updated•14 years ago
|
Reporter | ||
Updated•14 years ago
|
Updated•14 years ago
|
Updated•14 years ago
|
Comment 10•13 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Updated•3 years ago
|
Comment 12•4 months ago
|
||
Is this already done with hte different caches and script loaders today?
Comment 13•3 months ago
|
||
I don't typically see chrome JS (as opposed to content JS) show up in profiles. I don't know if that's a matter of looking in the wrong place?
I asked in #spidermonkey about stencil caching for chrome JS, and arai replied:
which chrome JS specifically? there are multiple caching mechanism
some of them may be the target of startup cache, or script preloader, or maybe not target of anything but just excluded by the upcoming scriptloader cache (because of being local file)
StartupCache covers:
- JS used by XUL
- system ESM (ChromeUtils.importESModule etc)
- subscript (Services.scriptloader.loadSubScript etc)
- self-hosted JS
- and some other non-JS, such as font
ScriptPreloader covers:
- frame script (mm.loadFrameScript etc)
- process script (ppmm.LoadProcessScript etc)
- system ESM (ChromeUtils.importESModule etc)
- subscript (Services.scriptloader.loadSubScript etc)
The upcoming cache for the DOM ScriptLoader targets the web contents. ScriptLoader is used also by some chrome-priv code, but those scripts are excluded by the target.
If we're already caching stencils for most of the important chrome JS, and we're not seeing hotspots in chrome JS where we really want to be in higher tiers sooner, then I don't think it's worth putting a lot of additional effort into additional caching here. (The exception is self-hosted JS, which does show up frequently in profiles; to help with that, Bryan is about to land a patch stack in bug 1827914 to use an in-memory cache to share baseline-compiled code across a runtime.)
Comment 14•3 months ago
•
|
||
FWIW, this is a samply profile of startup of my regular Firefox profile : https://share.firefox.dev/43iASu1
The parent-process appear to spend a lot of time around JS/GC. Is that the same thing as what this bug (ans stencil) aims to improve?
Comment 15•3 months ago
|
||
Am I looking in the right place? I see 77/1671 samples in the parent process being spent in JS, which is just under 5%. In particular, the fact that only 3 samples are in Ion implies to me that very little JS code gets hot in the parent process during startup; if it's mostly glue code, then stencil caching is probably good enough.
Description
•