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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(typescript-estree): hash code to reduce update frequency #1179

Merged
merged 1 commit into from
Nov 9, 2019

Conversation

yoyo930021
Copy link
Contributor

try to fix #1132

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @yoyo930021!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!


🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitors per day.

@yoyo930021
Copy link
Contributor Author

We need to look at another solution for Vue SFC is slow.

@yoyo930021 yoyo930021 changed the title fix(typescript-estrss): add file hash to compare update fix(typescript-estrss): record code hash for only update when necessary Nov 6, 2019
@yoyo930021
Copy link
Contributor Author

yoyo930021 commented Nov 6, 2019

Test result:

  • v2.6.1:
real 10.40
user 15.49
sys 0.80
  • This PR:
real 6.62
user 10.21
sys 0.61
  • v2.3.1:
real 6.32
user 10.03
sys 0.58

PS. The tested project is https://github.com/typescript-eslint/vega-lite.

@yoyo930021 yoyo930021 changed the title fix(typescript-estrss): record code hash for only update when necessary fix(typescript-estree): record code hash for only update when necessary Nov 6, 2019
Copy link
Member

@bradzacher bradzacher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGMT. two minor nits
Thanks for this

@bradzacher bradzacher added 1 approval One team member has approved this PR; a second should be enough to merge it bug Something isn't working and removed 1 approval One team member has approved this PR; a second should be enough to merge it labels Nov 8, 2019
@DanceParty
Copy link

Cannot wait to have this merged, my built time is drastically quicker and node cpu is much lower using this change. Thanks 🎉

Copy link
Member

@bradzacher bradzacher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for this

@bradzacher bradzacher changed the title fix(typescript-estree): record code hash for only update when necessary fix(typescript-estree): hash code to reduce update frequency Nov 9, 2019
@bradzacher bradzacher merged commit 96d1cc3 into typescript-eslint:master Nov 9, 2019
@JoshuaKGoldberg
Copy link
Member

FWIW, (presumably this fix in) 2.7.0 brought time to lint a ~2000 file, 90% TS / 10% JS project from 10 minutes to 2. Awesome fix, thank you so much! 🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[2.5.0] Lint runs are ~30% slower
4 participants