Open
Bug 873638
Opened 12 years ago
Updated 2 years ago
Removing XDR-encoded JS from StartupCache
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
NEW
People
(Reporter: bugzilla, Unassigned)
References
(Blocks 1 open bug)
Details
Filing this to track the topic discussed at JS Workweek 2013:
The question is whether the benefits of storing XDR-encoded scripts in StartupCache outweigh the overhead of the StartupCache itself.
Some possible options we discussed included perf improvements to JS parsing, and/or lazy parsing.
Updated•12 years ago
|
Blocks: start-faster
Reporter | ||
Comment 1•11 years ago
|
||
Here's some test data. This was generated from 10 xperf runs each and analyzed using a heavily-modified etlparser.py from the talos xperf tests.
Cold Start:
StartupCache average 4319.3ms
NoStartupCache average 4250.1ms
69.2ms improvement (1.6%)
Warm Start:
StartupCache average 789.5ms
NoStartupCache average 872.5ms
83.0ms regression (10.5%)
Comment 2•11 years ago
|
||
Do you have more detailed instrumentation. I remember you had some on when we load scripts vs execute them
Reporter | ||
Comment 3•11 years ago
|
||
This data is from running tests with that same create vs. execute instrumentation that I used at JS workweek. The binaries and profile are stored on a magnetic HDD. Times are in milliseconds.
------------------------------
StartupCache, parallel parsing
------------------------------
Max: 3424.937731, Min: 0.052377, Mean: 153.633616, Stddev: 501.808282
Scripts created but not executed: 1134 out of 2816 (40.269886%)
Script executions without corresponding creates: 12 out of 645 (1.860465%)
---------------------------------
StartupCache, Main-thread parsing
---------------------------------
Max: 2839.874946, Min: 0.052023, Mean: 190.439056, Stddev: 498.822704
Scripts created but not executed: 1126 out of 2812 (40.042674%)
Script executions without corresponding creates: 12 out of 651 (1.843318%)
--------------------------------
NoStartupCache, parallel parsing
--------------------------------
Max: 3449.443562, Min: 0.055562, Mean: 203.290102, Stddev: 584.567555
Scripts created but not executed: 6084 out of 9667 (62.935761%)
Script executions without corresponding creates: 3 out of 650 (0.461538%)
---------------------------
NoStartupCache, main-thread
---------------------------
Max: 2870.324534, Min: 0.053793, Mean: 214.096803, Stddev: 546.014798
Scripts created but not executed: 6083 out of 9681 (62.834418%)
Script executions without corresponding creates: 3 out of 651 (0.460829%)
The two things that stand out for me here are a higher maximum with parallel parsing, as well as a significantly higher number of scripts created in the NoStartupCache case (~2800 vs ~9600). That's probably a direct result of StartupCache bypassing parsing -- am I correct on this, Brian?
Flags: needinfo?(bhackett1024)
Comment 4•11 years ago
|
||
Hmm, using the StartupCache should still decode new scripts, so we should be creating about the same total number of scripts either way, though where they are created will differ. How did you measure the number of scripts created?
(Sorry for the late reply, I've been on vacation).
Flags: needinfo?(bhackett1024)
Reporter | ||
Comment 5•11 years ago
|
||
Logging for script creation was added here:
http://mxr.mozilla.org/mozilla-central/source/js/src/jsscript.cpp#2142
And then a python script parsed that data and incremented a counter whenever that log entry was encountered.
Assignee | ||
Updated•10 years ago
|
Assignee: general → nobody
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•