Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: use Set instead of iterating, and deduplicate a function #1278

Merged
merged 5 commits into from Nov 10, 2022

Conversation

G-Rath
Copy link
Collaborator

@G-Rath G-Rath commented Nov 5, 2022

This greatly improves performance when running on huge projects - I can't see any difference when running against the Jest codebase, but if I stick 3-4 copies of typescript.js (which is 10mb in size) then without this linting takes more than 3 minutes (I didn't let it finish) whereas afterwards it takes 30-60 seconds.

Weirdly this has also highlighted some test cases that apparently we didn't have yet somehow our coverage which has made me a little suspect that this could have changed behaviours, but all our tests are passing and there's no way to know for sure without having someone try this 馃し

Finally, I realised that scopeHasLocalReference is actually a complete duplication of resolveScope so have replaced that.

@G-Rath G-Rath merged commit 0e048f1 into main Nov 10, 2022
@G-Rath G-Rath deleted the improve-perf-again branch November 10, 2022 18:03
github-actions bot pushed a commit that referenced this pull request Nov 10, 2022
## [27.1.5](v27.1.4...v27.1.5) (2022-11-10)

### Performance Improvements

* use `Set` instead of iterating, and deduplicate a function ([#1278](#1278)) ([0e048f1](0e048f1))
@github-actions
Copy link

馃帀 This PR is included in version 27.1.5 馃帀

The release is available on:

Your semantic-release bot 馃摝馃殌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant