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): add flag EXPERIMENTAL_useSourceOfProjectReferenceRedirect#2669

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

Conversation

bradzacher
Copy link
Member

@bradzacherbradzacher commentedOct 12, 2020
edited
Loading

See#2094

This is quick-and-dirty to get this out there for some users to see what sort of perf improvements this squeezes out.
Intentionally not documenting the flag as it isn't ready to be used by the wider world

With the flag turned on
bradzacher@bradzacher-mbp typescript-eslint % DEBUG=typescript-eslint:* yarn eslint ./packages/types/src/index.ts ./packages/eslint-plugin/src/index.tsyarn run v1.22.4$ /Users/bradzacher/github/typescript-eslint/node_modules/.bin/eslint ./packages/types/src/index.ts ./packages/eslint-plugin/src/index.ts  typescript-eslint:typescript-estree:parser parserOptions.project (excluding ignored) matched projects: ['./tsconfig.eslint.json','./tests/integration/utils/jsconfig.json','./packages/eslint-plugin/tsconfig.json','./packages/eslint-plugin-internal/tsconfig.json','./packages/eslint-plugin-tslint/tsconfig.json','./packages/experimental-utils/tsconfig.json','./packages/parser/tsconfig.json','./packages/scope-manager/tsconfig.json','./packages/shared-fixtures/tsconfig.json','./packages/types/tsconfig.json','./packages/typescript-estree/tsconfig.json','./packages/visitor-keys/tsconfig.json'] +0ms  typescript-eslint:typescript-estree:createProjectProgram Creating project program for: /Users/bradzacher/github/typescript-eslint/packages/types/src/index.ts +0ms  typescript-eslint:typescript-estree:createWatchProgram File did not belong to any existing programs, moving to create/update. /users/bradzacher/github/typescript-eslint/packages/types/src/index.ts +0ms  typescript-eslint:typescript-estree:createWatchProgram Creating watch programfor /users/bradzacher/github/typescript-eslint/tsconfig.eslint.json. +0ms  typescript-eslint:typescript-estree:createWatchProgram Creating watch programfor /users/bradzacher/github/typescript-eslint/tests/integration/utils/jsconfig.json. +1s  typescript-eslint:typescript-estree:createWatchProgram Creating watch programfor /users/bradzacher/github/typescript-eslint/packages/eslint-plugin/tsconfig.json. +844ms  typescript-eslint:typescript-estree:createWatchProgram Found programfor file. /users/bradzacher/github/typescript-eslint/packages/types/src/index.ts +2s  typescript-eslint:parser:parser Resolved libs from program: ['es2017' ] +0ms  typescript-eslint:typescript-estree:parser parserOptions.project (excluding ignored) matched projects: ['./tsconfig.eslint.json','./tests/integration/utils/jsconfig.json','./packages/eslint-plugin/tsconfig.json','./packages/eslint-plugin-internal/tsconfig.json','./packages/eslint-plugin-tslint/tsconfig.json','./packages/experimental-utils/tsconfig.json','./packages/parser/tsconfig.json','./packages/scope-manager/tsconfig.json','./packages/shared-fixtures/tsconfig.json','./packages/types/tsconfig.json','./packages/typescript-estree/tsconfig.json','./packages/visitor-keys/tsconfig.json'] +5s  typescript-eslint:typescript-estree:createProjectProgram Creating project program for: /Users/bradzacher/github/typescript-eslint/packages/eslint-plugin/src/index.ts +5s  typescript-eslint:typescript-estree:createWatchProgram Found existing programfor file. /users/bradzacher/github/typescript-eslint/packages/eslint-plugin/src/index.ts +74ms  typescript-eslint:parser:parser Resolved libs from program: ['es2017' ] +70ms✨  Donein 6.50s.
With the flag turned off
bradzacher@bradzacher-mbp typescript-eslint % DEBUG=typescript-eslint:* yarn eslint ./packages/types/src/index.ts ./packages/eslint-plugin/src/index.tsyarn run v1.22.4$ /Users/bradzacher/github/typescript-eslint/node_modules/.bin/eslint ./packages/types/src/index.ts ./packages/eslint-plugin/src/index.ts  typescript-eslint:typescript-estree:parser parserOptions.project (excluding ignored) matched projects: ['./tsconfig.eslint.json','./tests/integration/utils/jsconfig.json','./packages/eslint-plugin/tsconfig.json','./packages/eslint-plugin-internal/tsconfig.json','./packages/eslint-plugin-tslint/tsconfig.json','./packages/experimental-utils/tsconfig.json','./packages/parser/tsconfig.json','./packages/scope-manager/tsconfig.json','./packages/shared-fixtures/tsconfig.json','./packages/types/tsconfig.json','./packages/typescript-estree/tsconfig.json','./packages/visitor-keys/tsconfig.json'] +0ms  typescript-eslint:typescript-estree:createProjectProgram Creating project program for: /Users/bradzacher/github/typescript-eslint/packages/types/src/index.ts +0ms  typescript-eslint:typescript-estree:createWatchProgram File did not belong to any existing programs, moving to create/update. /users/bradzacher/github/typescript-eslint/packages/types/src/index.ts +0ms  typescript-eslint:typescript-estree:createWatchProgram Creating watch programfor /users/bradzacher/github/typescript-eslint/tsconfig.eslint.json. +1ms  typescript-eslint:typescript-estree:createWatchProgram Creating watch programfor /users/bradzacher/github/typescript-eslint/tests/integration/utils/jsconfig.json. +1s  typescript-eslint:typescript-estree:createWatchProgram Creating watch programfor /users/bradzacher/github/typescript-eslint/packages/eslint-plugin/tsconfig.json. +976ms  typescript-eslint:typescript-estree:createWatchProgram Creating watch programfor /users/bradzacher/github/typescript-eslint/packages/eslint-plugin-internal/tsconfig.json. +2s  typescript-eslint:typescript-estree:createWatchProgram Creating watch programfor /users/bradzacher/github/typescript-eslint/packages/eslint-plugin-tslint/tsconfig.json. +1s  typescript-eslint:typescript-estree:createWatchProgram Creating watch programfor /users/bradzacher/github/typescript-eslint/packages/experimental-utils/tsconfig.json. +1s  typescript-eslint:typescript-estree:createWatchProgram Creating watch programfor /users/bradzacher/github/typescript-eslint/packages/parser/tsconfig.json. +961ms  typescript-eslint:typescript-estree:createWatchProgram Creating watch programfor /users/bradzacher/github/typescript-eslint/packages/scope-manager/tsconfig.json. +888ms  typescript-eslint:typescript-estree:createWatchProgram Creating watch programfor /users/bradzacher/github/typescript-eslint/packages/shared-fixtures/tsconfig.json. +996ms  typescript-eslint:typescript-estree:createWatchProgram Creating watch programfor /users/bradzacher/github/typescript-eslint/packages/types/tsconfig.json. +561ms  typescript-eslint:typescript-estree:createWatchProgram Found programfor file. /users/bradzacher/github/typescript-eslint/packages/types/src/index.ts +567ms  typescript-eslint:parser:parser Resolved libs from program: ['es2017' ] +0ms  typescript-eslint:typescript-estree:parser parserOptions.project (excluding ignored) matched projects: ['./tsconfig.eslint.json','./tests/integration/utils/jsconfig.json','./packages/eslint-plugin/tsconfig.json','./packages/eslint-plugin-internal/tsconfig.json','./packages/eslint-plugin-tslint/tsconfig.json','./packages/experimental-utils/tsconfig.json','./packages/parser/tsconfig.json','./packages/scope-manager/tsconfig.json','./packages/shared-fixtures/tsconfig.json','./packages/types/tsconfig.json','./packages/typescript-estree/tsconfig.json','./packages/visitor-keys/tsconfig.json'] +11s  typescript-eslint:typescript-estree:createProjectProgram Creating project program for: /Users/bradzacher/github/typescript-eslint/packages/eslint-plugin/src/index.ts +11s  typescript-eslint:typescript-estree:createWatchProgram Found existing programfor file. /users/bradzacher/github/typescript-eslint/packages/eslint-plugin/src/index.ts +64ms  typescript-eslint:parser:parser Resolved libs from program: ['es2017' ] +60ms✨  Donein 12.26s.

Comparisons:

With the flag turned on, runtime is ~6s.
With the flag turned off, runtime is ~12s.

With the flag turned on, we're able to find./packages/types/src/index.ts within theeslint-plugin program and exit early.
With the flag turned off, we have to iterate and calculate almost all of the programs to find the program fortypescript-estree (because our config is alphabetically sorted).

Important note that I just found out -projects are not carried through tsconfigextends!
To test this I had to duplicate the project references config between from the build tsconfigs into the dev tsconfigs.
Kind of annoying but w/e 🤷‍♂️

AviVahl and OliverJAsh reacted with rocket emoji
…renceRedirectSee#2094This is quick-and-dirty to get this out there for some users to see what sort of perf improvements this squeezes out.With the flag turned on:```bradzacher@bradzacher-mbp typescript-eslint % DEBUG=typescript-eslint:* yarn eslint ./packages/types/src/index.ts ./packages/eslint-plugin/src/index.tsyarn run v1.22.4$ /Users/bradzacher/github/typescript-eslint/node_modules/.bin/eslint ./packages/types/src/index.ts ./packages/eslint-plugin/src/index.ts  typescript-eslint:typescript-estree:parser parserOptions.project (excluding ignored) matched projects: [  './tsconfig.eslint.json',  './tests/integration/utils/jsconfig.json',  './packages/eslint-plugin/tsconfig.json',  './packages/eslint-plugin-internal/tsconfig.json',  './packages/eslint-plugin-tslint/tsconfig.json',  './packages/experimental-utils/tsconfig.json',  './packages/parser/tsconfig.json',  './packages/scope-manager/tsconfig.json',  './packages/shared-fixtures/tsconfig.json',  './packages/types/tsconfig.json',  './packages/typescript-estree/tsconfig.json',  './packages/visitor-keys/tsconfig.json'] +0ms  typescript-eslint:typescript-estree:createProjectProgram Creating project program for: /Users/bradzacher/github/typescript-eslint/packages/types/src/index.ts +0ms  typescript-eslint:typescript-estree:createWatchProgram File did not belong to any existing programs, moving to create/update. /users/bradzacher/github/typescript-eslint/packages/types/src/index.ts +0ms  typescript-eslint:typescript-estree:createWatchProgram Creating watch program for /users/bradzacher/github/typescript-eslint/tsconfig.eslint.json. +0ms  typescript-eslint:typescript-estree:createWatchProgram Creating watch program for /users/bradzacher/github/typescript-eslint/tests/integration/utils/jsconfig.json. +1s  typescript-eslint:typescript-estree:createWatchProgram Creating watch program for /users/bradzacher/github/typescript-eslint/packages/eslint-plugin/tsconfig.json. +844ms  typescript-eslint:typescript-estree:createWatchProgram Found program for file. /users/bradzacher/github/typescript-eslint/packages/types/src/index.ts +2s  typescript-eslint:parser:parser Resolved libs from program: [ 'es2017' ] +0ms  typescript-eslint:typescript-estree:parser parserOptions.project (excluding ignored) matched projects: [  './tsconfig.eslint.json',  './tests/integration/utils/jsconfig.json',  './packages/eslint-plugin/tsconfig.json',  './packages/eslint-plugin-internal/tsconfig.json',  './packages/eslint-plugin-tslint/tsconfig.json',  './packages/experimental-utils/tsconfig.json',  './packages/parser/tsconfig.json',  './packages/scope-manager/tsconfig.json',  './packages/shared-fixtures/tsconfig.json',  './packages/types/tsconfig.json',  './packages/typescript-estree/tsconfig.json',  './packages/visitor-keys/tsconfig.json'] +5s  typescript-eslint:typescript-estree:createProjectProgram Creating project program for: /Users/bradzacher/github/typescript-eslint/packages/eslint-plugin/src/index.ts +5s  typescript-eslint:typescript-estree:createWatchProgram Found existing program for file. /users/bradzacher/github/typescript-eslint/packages/eslint-plugin/src/index.ts +74ms  typescript-eslint:parser:parser Resolved libs from program: [ 'es2017' ] +70ms✨  Done in 6.50s.```With the flag turned off:```bradzacher@bradzacher-mbp typescript-eslint % DEBUG=typescript-eslint:* yarn eslint ./packages/types/src/index.ts ./packages/eslint-plugin/src/index.tsyarn run v1.22.4$ /Users/bradzacher/github/typescript-eslint/node_modules/.bin/eslint ./packages/types/src/index.ts ./packages/eslint-plugin/src/index.ts  typescript-eslint:typescript-estree:parser parserOptions.project (excluding ignored) matched projects: [  './tsconfig.eslint.json',  './tests/integration/utils/jsconfig.json',  './packages/eslint-plugin/tsconfig.json',  './packages/eslint-plugin-internal/tsconfig.json',  './packages/eslint-plugin-tslint/tsconfig.json',  './packages/experimental-utils/tsconfig.json',  './packages/parser/tsconfig.json',  './packages/scope-manager/tsconfig.json',  './packages/shared-fixtures/tsconfig.json',  './packages/types/tsconfig.json',  './packages/typescript-estree/tsconfig.json',  './packages/visitor-keys/tsconfig.json'] +0ms  typescript-eslint:typescript-estree:createProjectProgram Creating project program for: /Users/bradzacher/github/typescript-eslint/packages/types/src/index.ts +0ms  typescript-eslint:typescript-estree:createWatchProgram File did not belong to any existing programs, moving to create/update. /users/bradzacher/github/typescript-eslint/packages/types/src/index.ts +0ms  typescript-eslint:typescript-estree:createWatchProgram Creating watch program for /users/bradzacher/github/typescript-eslint/tsconfig.eslint.json. +1ms  typescript-eslint:typescript-estree:createWatchProgram Creating watch program for /users/bradzacher/github/typescript-eslint/tests/integration/utils/jsconfig.json. +1s  typescript-eslint:typescript-estree:createWatchProgram Creating watch program for /users/bradzacher/github/typescript-eslint/packages/eslint-plugin/tsconfig.json. +976ms  typescript-eslint:typescript-estree:createWatchProgram Creating watch program for /users/bradzacher/github/typescript-eslint/packages/eslint-plugin-internal/tsconfig.json. +2s  typescript-eslint:typescript-estree:createWatchProgram Creating watch program for /users/bradzacher/github/typescript-eslint/packages/eslint-plugin-tslint/tsconfig.json. +1s  typescript-eslint:typescript-estree:createWatchProgram Creating watch program for /users/bradzacher/github/typescript-eslint/packages/experimental-utils/tsconfig.json. +1s  typescript-eslint:typescript-estree:createWatchProgram Creating watch program for /users/bradzacher/github/typescript-eslint/packages/parser/tsconfig.json. +961ms  typescript-eslint:typescript-estree:createWatchProgram Creating watch program for /users/bradzacher/github/typescript-eslint/packages/scope-manager/tsconfig.json. +888ms  typescript-eslint:typescript-estree:createWatchProgram Creating watch program for /users/bradzacher/github/typescript-eslint/packages/shared-fixtures/tsconfig.json. +996ms  typescript-eslint:typescript-estree:createWatchProgram Creating watch program for /users/bradzacher/github/typescript-eslint/packages/types/tsconfig.json. +561ms  typescript-eslint:typescript-estree:createWatchProgram Found program for file. /users/bradzacher/github/typescript-eslint/packages/types/src/index.ts +567ms  typescript-eslint:parser:parser Resolved libs from program: [ 'es2017' ] +0ms  typescript-eslint:typescript-estree:parser parserOptions.project (excluding ignored) matched projects: [  './tsconfig.eslint.json',  './tests/integration/utils/jsconfig.json',  './packages/eslint-plugin/tsconfig.json',  './packages/eslint-plugin-internal/tsconfig.json',  './packages/eslint-plugin-tslint/tsconfig.json',  './packages/experimental-utils/tsconfig.json',  './packages/parser/tsconfig.json',  './packages/scope-manager/tsconfig.json',  './packages/shared-fixtures/tsconfig.json',  './packages/types/tsconfig.json',  './packages/typescript-estree/tsconfig.json',  './packages/visitor-keys/tsconfig.json'] +11s  typescript-eslint:typescript-estree:createProjectProgram Creating project program for: /Users/bradzacher/github/typescript-eslint/packages/eslint-plugin/src/index.ts +11s  typescript-eslint:typescript-estree:createWatchProgram Found existing program for file. /users/bradzacher/github/typescript-eslint/packages/eslint-plugin/src/index.ts +64ms  typescript-eslint:parser:parser Resolved libs from program: [ 'es2017' ] +60ms✨  Done in 12.26s.```
@bradzacherbradzacher added the enhancementNew feature or request labelOct 12, 2020
@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. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitorsper day.

@codecov
Copy link

codecovbot commentedOct 12, 2020
edited
Loading

Codecov Report

Merging#2669 intomaster willdecrease coverage by0.04%.
The diff coverage is80.00%.

@@            Coverage Diff             @@##           master    #2669      +/-   ##==========================================- Coverage   92.83%   92.78%   -0.05%==========================================  Files         294      294                Lines        9666     9676      +10       Branches     2711     2713       +2     ==========================================+ Hits         8973     8978       +5- Misses        327      330       +3- Partials      366      368       +2
FlagCoverage Δ
#unittest92.78% <80.00%> (-0.05%)⬇️

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

Impacted FilesCoverage Δ
...pt-estree/src/create-program/createWatchProgram.ts77.15% <80.00%> (-1.46%)⬇️

@bradzacherbradzacher marked this pull request as ready for reviewOctober 13, 2020 18:04
@bradzacherbradzacher merged commit90a5878 intomasterOct 15, 2020
@bradzacherbradzacher deleted the EXPERIMENTAL_useSourceOfProjectReferenceRedirect branchOctober 15, 2020 18:01
@bradzacherbradzacher linked an issueOct 16, 2020 that may beclosed by this pull request
@github-actionsgithub-actionsbot locked asresolvedand limited conversation to collaboratorsNov 15, 2020
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers
No reviews
Assignees
No one assigned
Labels
enhancementNew feature or request
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Support for Project References
1 participant
@bradzacher

[8]ページ先頭

©2009-2025 Movatter.jp