-
-
Notifications
You must be signed in to change notification settings - Fork 430
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
Optimize fileExists callback path #1266
Optimize fileExists callback path #1266
Conversation
Instead of looking up filePathKey twice, cache in in the local scope. This isn't a hugely expensive lookup path, but is a hot path on large project recompiles (especially after caches are blown away). Profiling shows that even the Map lookup shows non-trivial cache lookup aggregate time
looks good! Can you update the |
@johnnyreilly - any idea what's up with the travis test failure? It was clean before I bumped package.json & I don't see any reason why my change should cause the listed failure Edit: Looks like I'm not the only failure on this https://travis-ci.org/github/TypeStrong/ts-loader/jobs/762060860 |
travis has been flaky for a while and I want to remove it entirely - can't find the relevant setting in GitHub alas. It's intentionally not required so don''t worry. |
Instead of looking up filePathKey twice, cache in in the local scope. This isn't a hugely expensive lookup path, but is a hot path on large project recompiles (especially after caches are blown away). Profiling shows that even the Map lookup shows non-trivial cache lookup aggregate time. (Less than a non-cached implementation though :) )