Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(typescript-estree): cache project glob resolution#6367

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
JoshuaKGoldberg merged 6 commits intomainfromcache-glob-resolution
Jan 31, 2023

Conversation

bradzacher
Copy link
Member

@bradzacherbradzacher commentedJan 23, 2023
edited
Loading

PR Checklist

Overview

Whilst reviewing#6084 I realised we could save some time in the parser by caching theparserOptions.project glob resolution results. So I spent a bit of time throwing this together.

I tested this locally and it saved a little bit of time (~1 second) because our glob is so small (we usepackages/*/tsconfig.json - which only matches 15 folders.
Though it's still eye-opening to see that the tiny globbing for our repo adds up to an entire second.

I double checked these results by taking a CPU profile before and after:

$ TSESTREE_SINGLE_RUN=true node --cpu-prof ./node_modules/.bin/eslint.

Then I inspected the profiles onhttps://speedscope.app
For reference - the profiles:PROFILES.zip

Before change:
image

After change:
image

I would expect that this change should show a large perf improvement in the following cases:

  • single-star glob that matches many directories (egpackages/*/tsconfig.json on something the size ofbabel's packages folder or bigger)
  • lots of globs matching all over the place (eg['foo/*/tsconfig.json', 'bar/*/tsconfig.json', 'baz/*/tsconfig.json', ...])
  • really any case with double star globs

JoshuaKGoldberg reacted with rocket emoji
@bradzacherbradzacher added the performanceIssues regarding performance labelJan 23, 2023
@typescript-eslint
Copy link
Contributor

Thanks for the PR,@bradzacher!

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 onhttps://opencollective.com/typescript-eslint.

@nx-cloud
Copy link

nx-cloudbot commentedJan 23, 2023
edited
Loading

☁️ Nx Cloud Report

CI is running/has finished running commands for commit5e71d4b. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 47 targets

Sent with 💌 fromNxCloud.

@netlify
Copy link

netlifybot commentedJan 23, 2023
edited
Loading

Deploy Preview fortypescript-eslint ready!

NameLink
🔨 Latest commit5e71d4b
🔍 Latest deploy loghttps://app.netlify.com/sites/typescript-eslint/deploys/63d97ae88ea4330008327daa
😎 Deploy Previewhttps://deploy-preview-6367--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to yourNetlify site settings.

@codecov
Copy link

codecovbot commentedJan 23, 2023
edited
Loading

Codecov Report

Merging#6367 (6ec13e0) intomain (5bf7f7f) willincrease coverage by0.01%.
The diff coverage is93.15%.

Additional details and impacted files
@@            Coverage Diff             @@##             main    #6367      +/-   ##==========================================+ Coverage   91.38%   91.40%   +0.01%==========================================  Files         368      370       +2       Lines       12608    12652      +44       Branches     3713     3723      +10     ==========================================+ Hits        11522    11564      +42- Misses        770      771       +1- Partials      316      317       +1
FlagCoverage Δ
unittest91.40% <93.15%> (+0.01%)⬆️

Flags with carried forward coverage won't be shown.Click here to find out more.

Impacted FilesCoverage Δ
.../src/create-program/getWatchProgramsForProjects.ts79.08% <ø> (+0.68%)⬆️
...ges/typescript-estree/src/create-program/shared.ts80.43% <50.00%> (-2.90%)⬇️
...pescript-estree/src/parseSettings/ExpiringCache.ts95.23% <95.23%> (ø)
...ipt-estree/src/parseSettings/resolveProjectList.ts95.55% <95.55%> (ø)
...pt-estree/src/parseSettings/createParseSettings.ts97.50% <100.00%> (+0.67%)⬆️

Copy link
Member

@JoshuaKGoldbergJoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

Love to see the perf improvements!

@JoshuaKGoldbergJoshuaKGoldberg added the awaiting responseIssues waiting for a reply from the OP or another party labelJan 25, 2023
@bradzacherbradzacher removed the awaiting responseIssues waiting for a reply from the OP or another party labelJan 30, 2023
JoshuaKGoldberg
JoshuaKGoldberg previously approved these changesJan 31, 2023
Copy link
Member

@JoshuaKGoldbergJoshuaKGoldberg left a comment
edited
Loading

Choose a reason for hiding this comment

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

🔥:shipit:

(once build fix)

@JoshuaKGoldbergJoshuaKGoldberg merged commitafae837 intomainJan 31, 2023
@JoshuaKGoldbergJoshuaKGoldberg deleted the cache-glob-resolution branchJanuary 31, 2023 20:47
@github-actionsgithub-actionsbot locked asresolvedand limited conversation to collaboratorsFeb 8, 2023
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@JoshuaKGoldbergJoshuaKGoldbergJoshuaKGoldberg left review comments

Assignees
No one assigned
Labels
performanceIssues regarding performance
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@bradzacher@JoshuaKGoldberg

[8]ページ先頭

©2009-2025 Movatter.jp