Analyze usage of SharedImmutableScriptData
Categories
(Core :: JavaScript Engine, task, P1)
Tracking
()
People
(Reporter: nbp, Assigned: nbp)
References
(Blocks 2 open bugs)
Details
Attachments
(1 file)
|
Bug 1671426 - Count number of immutable data references under BytecodeEmitter::intoScriptStencil. r=
47 bytes,
text/x-phabricator-request
|
Details | Review |
SharedImmutableScriptData is used to reduce memory when after the compilation of similar script. This is expected to be used for the eval-cache, and web workers, self-hosted code and (previously?) JSM.
As we are moving toward having a CompilationStencil cache, having a SharedImmutableScriptData would only make sense for cases which are not generated out of the same source.
Thus what would be interesting is to measure the existing amount of sharing for all sources which are shared as the result of the same parser output, where this no sharing possible from an earlier cache (which might prevent the parsing time as well).
| Assignee | ||
Updated•6 years ago
|
| Assignee | ||
Comment 1•5 years ago
|
||
| Assignee | ||
Comment 2•5 years ago
|
||
Running the given patch in a browsing session where I visit ~30 random website all opened in multiple tabs which are alive next to each others in multiple content processes.
JS_SHARE_IMMUTABLE_DATA_AFTER_PARSE
167,835 samples, average = 19.8, sum = 3,322,211
1 | 0 0%
2 |######################### 136262 81%
4 |# 5598 3%
5 |# 4086 2%
6 |# 2809 2%
7 | 1918 1%
9 | 667 0%
10 |### 16495 10%
Which implies that 81% of the scripts are loaded only once and are unique per-website.
The remaining 19% are either multiples loads of the same script or loads of different script having the same functions.
| Assignee | ||
Updated•5 years ago
|
Description
•