-
Notifications
You must be signed in to change notification settings - Fork 234
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
perf: don't collect more info than needed when resolving jest functions #1275
Conversation
Woah, surprised by the big difference! Great job 👍 |
Based on percentages, 17.4 seconds vs 5.4 seconds for the actual rules running. The extra time in the full runtime is eslint internals. Nice! |
I just tried the same optimization to |
## [27.1.4](v27.1.3...v27.1.4) (2022-11-04) ### Performance Improvements * don't collect more info than needed when resolving jest functions ([#1275](#1275)) ([e4a5674](e4a5674))
It might be possible to improve this even more. There is a
|
@SLKnutson neat, but for me that doesn't give any noticeable improvements on the performance so I think it's not worth switching just to save a line of code. |
btw @SLKnutson if you wouldn't mind, I would be interested in seeing what the difference is if you are/are not using fwiw I've also tried caching resolving things at each level of scope, which also made no significant difference. |
@G-Rath
|
Huge thanks to @SLKnutson for pointing this out - this is mainly a win for larger codebases, since we still have to loop until we find the information we need (or don't), but it is definitely faster
Before, completed in ~30 seconds:
After, completed in ~15 seconds:
Resolves #1274