0.1.0 • Published 10 years ago
instrument-v8 v0.1.0
instrument-v8 (WIP)
Instrument your code to see if everything is optimized.
Inspired by this article: https://github.com/petkaantonov/bluebird/wiki/Optimization-killers
Installation
npm install instrument-v8 -gUsage
instrument-v8 <pathToModule> --methodToCall=argumentsForMethodfor example, let's take Jade:
npm install jadeLet's see if the render function is optimized:
instrument-v8 node_modules/jade --render='""'The results is:
Function jade::render is not optimizedIf you look into the source code you will see that there is a try-catch that is preventing optimizations. The solution is to move the try-catch to a separate function allowing the rest of the render function to be optimized.
See Also
0.1.0
10 years ago