deoptigate app.js
Jason Miller aka @_developit, creator of preact. | John-David Dalton aka @jdalton, creator of lodash. |
Why the New V8 is so Damn Fast | Tracking Down and Fixing Performance Bottlenecks with N|Solid and Deoptigate |
npm install -g deoptigate
deoptigate app.js
Override Node.js executable and/or pass it custom arguments
deoptigate -- /bin/mynode app.js
deoptigate -- node --allow-natives-syntax app.js
Simply run deoptigate
from the directory that contains the log file(s).
Launch a Chromium-based browser with the necessary tracing flags. For example,
running on localhost and writing the log file to the /temp/trace
directory:
%browser% --no-sandbox --js-flags="--trace-ic --nologfile-per-isolate --logfile=/temp/trace/v8.log" http://localhost:8000/
When running with no sandbox, you can also load pages directly from disk, e.g.
%browser% --no-sandbox --disable-extensions --js-flags="--trace-ic --nologfile-per-isolate --logfile=/temp/trace/v8.log" c:\temp\trace\default.html
With the directory containing the log file as the current directory, run deoptigate
.
Note: The JavaScript files to analyze must be laid out in the current directory
as they are in the URL path. For example, if the browser loaded a file at
http://localhost:8000/js/app.js
above, then the file should exist at /temp/trace/js/app.js
.
If the local copy does not exist, it will not appear in the analysis.
MIT