-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gatsby before/after #3
Comments
Interesting! It is supposed to help solve parse time. @nolanlawson can comment more on it. |
I need to setup |
You can use I’d recommend just using: var start = performance.now();
// code goes DIRECTLY here
var end = performance.now();
reportSomehow(end - start); Also keep in mind that you would need to add a random query param to the end of the script URL if you want to run it multiple times and take the median/average, because otherwise the parsed/JITed result will be cached. – Nolan |
Also FWIW this doesn't just affect V8; it also affects Chakra and SpiderMonkey. See: http://github.com/nolanlawson/optimize-js |
My question is, where and what are you measuring. Where should the start measure go and where should the stop mark go. They answer will help me understand what the hell to look for. |
Whatever code you're trying to optimize, that's the code you should wrap in |
Ah thats true. I think we discovered the other browsers engaging in this sort of heuristic after I created the plugin. Ugh renaming things. |
⏩ LazyParseWebpackPlugin |
Lol yes I'm probably going to just change it to that |
Couldn't really see any difference. There's a fair bit of variation on timing but the "long frame" time was around ~180ms for both with or without this plugin.
The text was updated successfully, but these errors were encountered: