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
feat: add v8-compile-cache #4272
Conversation
It would be good to get some before and after benchmarks (like so), so we know the benefit of this change. |
Don't now how it works exactly =)
after several runs For code in |
Try to run |
@evilebottnawi something like that function measureRequire() {
const t = process.hrtime();
require("./bin/stylelint");
console.log('stylelint: ' + process.hrtime(t)[1] / 1e+6);
}
const retry = fn => times => new Array(times).fill(0).forEach((_, i) => fn(i));
retry(measureRequire)(10); ??? |
Are those the results from the PR branch or master? |
@vankop just create suite WITH_CACHE (where true) and WITH_CACHE (where unspecific) |
Good perf on first run |
Yep, better on first run. LGTM. |
inspired by eslint/eslint#11921 =)
nothing