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 incorrect flags in modifierFlagsCache #56198

Merged
merged 4 commits into from
Oct 25, 2023
Merged

Fix incorrect flags in modifierFlagsCache #56198

merged 4 commits into from
Oct 25, 2023

Conversation

rbuckton
Copy link
Member

@rbuckton rbuckton commented Oct 24, 2023

Due to the overlap between syntactic and JSDoc modifiers, there exists a case where what we report as cached syntactic modifiers can change in a JS file. To avoid this conflict, this PR modifies the caching behavior for modifier flags to give JSDoc modifiers their own cache value when they overlap with a syntactic modifier. The cache-only modifiers are then converted back to what we normally produce for those modifiers so as not to break existing callers.

Fixes #42189

@typescript-bot typescript-bot added Author: Team For Milestone Bug PRs that fix a bug with a specific milestone labels Oct 24, 2023
@typescript-bot
Copy link
Collaborator

Looks like you're introducing a change to the public API surface area. If this includes breaking changes, please document them on our wiki's API Breaking Changes page.

Also, please make sure @DanielRosenwasser and @RyanCavanaugh are aware of the changes, just as a heads up.

@rbuckton
Copy link
Member Author

@typescript-bot perf test

@typescript-bot
Copy link
Collaborator

typescript-bot commented Oct 24, 2023

Heya @rbuckton, I've started to run the regular perf test suite on this PR at 428d327. You can monitor the build here.

Update: The results are in!

@rbuckton
Copy link
Member Author

@typescript-bot run dt
@typescript-bot test this
@typescript-bot user test this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Oct 24, 2023

Heya @rbuckton, I've started to run the parallelized Definitely Typed test suite on this PR at 428d327. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Oct 24, 2023

Heya @rbuckton, I've started to run the diff-based user code test suite on this PR at 428d327. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

@rbuckton Here are the results of running the user test suite comparing main and refs/pull/56198/merge:

There were infrastructure failures potentially unrelated to your change:

  • 3 instances of "Package install failed"
  • 1 instance of "Unknown failure"

Otherwise...

Everything looks good!

@rbuckton rbuckton marked this pull request as draft October 24, 2023 01:10
@typescript-bot
Copy link
Collaborator

@rbuckton
The results of the perf run you requested are in!

Here they are:

Compiler

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Angular - node (v18.15.0, x64)
Memory used 295,097k (± 0.02%) 295,069k (± 0.01%) ~ 295,033k 295,099k p=0.297 n=6
Parse Time 2.63s (± 0.37%) 2.64s (± 0.32%) ~ 2.63s 2.65s p=0.340 n=6
Bind Time 0.83s (± 0.62%) 0.86s (± 0.87%) +0.03s (+ 3.40%) 0.85s 0.87s p=0.004 n=6
Check Time 8.04s (± 0.17%) 8.12s (± 0.44%) +0.07s (+ 0.91%) 8.05s 8.15s p=0.014 n=6
Emit Time 7.05s (± 0.32%) 7.05s (± 0.29%) ~ 7.02s 7.08s p=1.000 n=6
Total Time 18.56s (± 0.07%) 18.67s (± 0.23%) +0.11s (+ 0.58%) 18.61s 18.72s p=0.004 n=6
Compiler-Unions - node (v18.15.0, x64)
Memory used 192,583k (± 1.55%) 192,601k (± 1.56%) ~ 190,632k 196,547k p=0.689 n=6
Parse Time 1.35s (± 0.56%) 1.34s (± 0.94%) ~ 1.32s 1.36s p=0.167 n=6
Bind Time 0.73s (± 0.00%) 0.74s (± 0.00%) +0.01s (+ 1.37%) 0.74s 0.74s p=0.001 n=6
Check Time 9.13s (± 0.35%) 9.21s (± 0.22%) +0.08s (+ 0.82%) 9.18s 9.24s p=0.008 n=6
Emit Time 2.64s (± 0.39%) 2.63s (± 0.47%) ~ 2.61s 2.64s p=0.128 n=6
Total Time 13.85s (± 0.23%) 13.92s (± 0.26%) +0.07s (+ 0.51%) 13.86s 13.97s p=0.012 n=6
Monaco - node (v18.15.0, x64)
Memory used 347,318k (± 0.01%) 347,338k (± 0.00%) ~ 347,320k 347,359k p=0.173 n=6
Parse Time 2.45s (± 1.33%) 2.46s (± 0.21%) ~ 2.46s 2.47s p=1.000 n=6
Bind Time 0.95s (± 1.72%) 0.97s (± 0.42%) +0.02s (+ 2.64%) 0.97s 0.98s p=0.038 n=6
Check Time 6.92s (± 0.58%) 7.04s (± 0.15%) +0.12s (+ 1.73%) 7.03s 7.06s p=0.005 n=6
Emit Time 4.02s (± 0.29%) 4.01s (± 0.34%) ~ 3.99s 4.03s p=0.563 n=6
Total Time 14.34s (± 0.25%) 14.49s (± 0.10%) +0.15s (+ 1.02%) 14.47s 14.51s p=0.005 n=6
TFS - node (v18.15.0, x64)
Memory used 302,567k (± 0.01%) 302,578k (± 0.00%) ~ 302,570k 302,586k p=0.199 n=6
Parse Time 2.00s (± 0.75%) 2.00s (± 1.08%) ~ 1.97s 2.03s p=0.567 n=6
Bind Time 1.01s (± 0.97%) 1.04s (± 0.50%) +0.03s (+ 2.81%) 1.03s 1.04s p=0.004 n=6
Check Time 6.25s (± 0.39%) 6.29s (± 0.35%) ~ 6.25s 6.31s p=0.052 n=6
Emit Time 3.58s (± 0.88%) 3.56s (± 0.46%) ~ 3.54s 3.58s p=0.367 n=6
Total Time 12.84s (± 0.24%) 12.88s (± 0.36%) ~ 12.79s 12.91s p=0.106 n=6
material-ui - node (v18.15.0, x64)
Memory used 470,475k (± 0.00%) 470,567k (± 0.01%) +93k (+ 0.02%) 470,525k 470,620k p=0.005 n=6
Parse Time 2.57s (± 0.25%) 2.59s (± 0.24%) +0.02s (+ 0.78%) 2.58s 2.60s p=0.005 n=6
Bind Time 1.00s (± 1.17%) 1.05s (± 0.93%) 🔻+0.05s (+ 5.34%) 1.04s 1.06s p=0.005 n=6
Check Time 16.61s (± 0.40%) 16.78s (± 0.31%) +0.16s (+ 0.97%) 16.69s 16.85s p=0.008 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 20.18s (± 0.33%) 20.42s (± 0.26%) +0.24s (+ 1.16%) 20.32s 20.47s p=0.005 n=6
xstate - node (v18.15.0, x64)
Memory used 512,594k (± 0.02%) 512,685k (± 0.00%) +91k (+ 0.02%) 512,670k 512,709k p=0.031 n=6
Parse Time 3.27s (± 0.32%) 3.27s (± 0.27%) ~ 3.26s 3.28s p=0.452 n=6
Bind Time 1.55s (± 0.26%) 1.64s (± 0.00%) 🔻+0.09s (+ 5.69%) 1.64s 1.64s p=0.002 n=6
Check Time 2.84s (± 0.68%) 2.87s (± 0.74%) +0.03s (+ 1.17%) 2.85s 2.90s p=0.020 n=6
Emit Time 0.08s (± 0.00%) 0.08s (± 0.00%) ~ 0.08s 0.08s p=1.000 n=6
Total Time 7.73s (± 0.42%) 7.86s (± 0.17%) +0.13s (+ 1.73%) 7.85s 7.88s p=0.005 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • Angular - node (v18.15.0, x64)
  • Compiler-Unions - node (v18.15.0, x64)
  • Monaco - node (v18.15.0, x64)
  • TFS - node (v18.15.0, x64)
  • material-ui - node (v18.15.0, x64)
  • xstate - node (v18.15.0, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

tsserver

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Compiler-UnionsTSServer - node (v18.15.0, x64)
Req 1 - updateOpen 2,402ms (± 1.33%) 2,360ms (± 0.98%) -42ms (- 1.73%) 2,334ms 2,399ms p=0.037 n=6
Req 2 - geterr 5,334ms (± 1.19%) 5,401ms (± 1.14%) +67ms (+ 1.25%) 5,343ms 5,520ms p=0.045 n=6
Req 3 - references 330ms (± 1.32%) 325ms (± 1.18%) ~ 320ms 329ms p=0.105 n=6
Req 4 - navto 277ms (± 1.19%) 283ms (± 1.27%) +6ms (+ 2.29%) 276ms 285ms p=0.033 n=6
Req 5 - completionInfo count 1,356 (± 0.00%) 1,356 (± 0.00%) ~ 1,356 1,356 p=1.000 n=6
Req 5 - completionInfo 77ms (± 7.43%) 66ms (± 8.82%) 🟩-11ms (-14.22%) 61ms 77ms p=0.043 n=6
CompilerTSServer - node (v18.15.0, x64)
Req 1 - updateOpen 2,477ms (± 1.28%) 2,480ms (± 1.17%) ~ 2,432ms 2,508ms p=0.748 n=6
Req 2 - geterr 4,084ms (± 1.45%) 4,125ms (± 1.26%) +41ms (+ 1.00%) 4,074ms 4,224ms p=0.045 n=6
Req 3 - references 342ms (± 1.22%) 342ms (± 1.40%) ~ 332ms 345ms p=0.720 n=6
Req 4 - navto 284ms (± 0.36%) 300ms (± 1.91%) 🔻+15ms (+ 5.33%) 293ms 305ms p=0.005 n=6
Req 5 - completionInfo count 1,518 (± 0.00%) 1,518 (± 0.00%) ~ 1,518 1,518 p=1.000 n=6
Req 5 - completionInfo 86ms (± 6.16%) 76ms (± 5.89%) 🟩-10ms (-11.09%) 67ms 78ms p=0.037 n=6
xstateTSServer - node (v18.15.0, x64)
Req 1 - updateOpen 2,596ms (± 0.32%) 2,635ms (± 0.43%) +38ms (+ 1.47%) 2,613ms 2,646ms p=0.005 n=6
Req 2 - geterr 1,676ms (± 1.78%) 1,691ms (± 2.82%) ~ 1,639ms 1,762ms p=0.689 n=6
Req 3 - references 119ms (± 8.59%) 108ms (± 8.03%) 🟩-11ms (- 9.28%) 102ms 125ms p=0.028 n=6
Req 4 - navto 360ms (± 0.29%) 364ms (± 0.35%) +4ms (+ 1.20%) 362ms 365ms p=0.004 n=6
Req 5 - completionInfo count 2,073 (± 0.00%) 2,073 (± 0.00%) ~ 2,073 2,073 p=1.000 n=6
Req 5 - completionInfo 308ms (± 2.51%) 296ms (± 3.15%) 🟩-12ms (- 4.00%) 287ms 312ms p=0.037 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • CompilerTSServer - node (v18.15.0, x64)
  • Compiler-UnionsTSServer - node (v18.15.0, x64)
  • xstateTSServer - node (v18.15.0, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

Startup

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
tsc-startup - node (v18.15.0, x64)
Execution time 152.50ms (± 0.17%) 152.36ms (± 0.20%) -0.15ms (- 0.10%) 151.14ms 156.00ms p=0.000 n=600
tsserver-startup - node (v18.15.0, x64)
Execution time 227.61ms (± 0.14%) 227.50ms (± 0.15%) -0.11ms (- 0.05%) 225.98ms 231.16ms p=0.000 n=600
tsserverlibrary-startup - node (v18.15.0, x64)
Execution time 228.75ms (± 0.15%) 228.80ms (± 0.17%) ~ 227.27ms 231.98ms p=0.619 n=600
typescript-startup - node (v18.15.0, x64)
Execution time 228.63ms (± 0.14%) 228.81ms (± 0.17%) +0.18ms (+ 0.08%) 227.11ms 231.82ms p=0.000 n=600
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • tsc-startup - node (v18.15.0, x64)
  • tsserver-startup - node (v18.15.0, x64)
  • tsserverlibrary-startup - node (v18.15.0, x64)
  • typescript-startup - node (v18.15.0, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

Developer Information:

Download Benchmarks

@typescript-bot
Copy link
Collaborator

Hey @rbuckton, the results of running the DT tests are ready.
There were interesting changes:

Branch only errors:

Package: es-abstract
Error:

Error: /home/vsts/work/1/DefinitelyTyped/types/es-abstract/es6.d.ts:3:1
ERROR: 3:1  expect  TypeScript@local compile error: 
An export assignment cannot have modifiers.

/home/vsts/work/1/DefinitelyTyped/types/es-abstract/es7.d.ts:3:1
ERROR: 3:1  expect  TypeScript@local compile error: 
An export assignment cannot have modifiers.

    at testTypesVersion (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@definitelytyped+dtslint@0.0.184_typescript@5.3.0-dev.20231023/node_modules/@definitelytyped/dtslint/dist/index.js:171:15)
    at async runTests (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@definitelytyped+dtslint@0.0.184_typescript@5.3.0-dev.20231023/node_modules/@definitelytyped/dtslint/dist/index.js:130:9)

Package: es-to-primitive
Error:

Error: /home/vsts/work/1/DefinitelyTyped/types/es-to-primitive/es6.d.ts:3:1
ERROR: 3:1  expect  TypeScript@local compile error: 
An export assignment cannot have modifiers.

    at testTypesVersion (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@definitelytyped+dtslint@0.0.184_typescript@5.3.0-dev.20231023/node_modules/@definitelytyped/dtslint/dist/index.js:171:15)
    at async runTests (/home/vsts/work/1/DefinitelyTyped/node_modules/.pnpm/@definitelytyped+dtslint@0.0.184_typescript@5.3.0-dev.20231023/node_modules/@definitelytyped/dtslint/dist/index.js:130:9)

You can check the log here.

@rbuckton rbuckton marked this pull request as ready for review October 24, 2023 14:59
@rbuckton
Copy link
Member Author

(from the original issue)

I don't know if this already causes a user-facing bug, but it might in the future.

Turns out there was a bug in fixSpelling that this change made apparent as we were requesting only a syntactic override for a code-fix when we should have been requesting the effective override.

@rbuckton
Copy link
Member Author

:( I was hoping the perf cost would be negligible, but that doesn't seem to be the case.

@jakebailey
Copy link
Member

Where does the slowdown come from? A bit hard to tell at a glance. Are we calling getJSDocModifierFlagsNoCache twice somehow?

One interesting bit is that the Deprecated modifier isn't used at all to determine whether or not a symbol is deprecated or not (in fact it's entirely unreferenced); that instead is done directly in the parser through a goofy backdoor (which I once tried to remove in an effort to make JSDoc parsing fully lazy). Maybe that fact doesn't help given people may be querying modifiers for that info externally?

@rbuckton
Copy link
Member Author

I'm guessing the issue may be all of the additional conditional branches that have to be hit in a hot code path. I'm reworking it to avoid the branches.

@rbuckton
Copy link
Member Author

It's also being too aggressive in collecting JSDoc modifiers in a TS file.

@rbuckton
Copy link
Member Author

@typescript-bot perf test

@typescript-bot
Copy link
Collaborator

typescript-bot commented Oct 24, 2023

Heya @rbuckton, I've started to run the regular perf test suite on this PR at f4253de. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

@rbuckton
The results of the perf run you requested are in!

Here they are:

Compiler

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Angular - node (v18.15.0, x64)
Memory used 295,097k (± 0.01%) 295,071k (± 0.01%) ~ 295,013k 295,107k p=0.230 n=6
Parse Time 2.63s (± 0.34%) 2.62s (± 0.39%) ~ 2.61s 2.64s p=0.273 n=6
Bind Time 0.84s (± 0.97%) 0.83s (± 1.00%) ~ 0.83s 0.85s p=0.718 n=6
Check Time 8.03s (± 0.32%) 8.04s (± 0.33%) ~ 8.01s 8.07s p=0.683 n=6
Emit Time 7.09s (± 0.25%) 7.06s (± 0.32%) ~ 7.03s 7.09s p=0.084 n=6
Total Time 18.59s (± 0.15%) 18.56s (± 0.21%) ~ 18.51s 18.62s p=0.228 n=6
Compiler-Unions - node (v18.15.0, x64)
Memory used 193,054k (± 1.48%) 193,576k (± 1.64%) ~ 190,670k 196,491k p=1.000 n=6
Parse Time 1.35s (± 0.90%) 1.36s (± 1.02%) ~ 1.34s 1.38s p=0.176 n=6
Bind Time 0.73s (± 0.00%) 0.73s (± 0.00%) ~ 0.73s 0.73s p=1.000 n=6
Check Time 9.16s (± 0.30%) 9.15s (± 0.31%) ~ 9.11s 9.20s p=0.413 n=6
Emit Time 2.64s (± 0.29%) 2.63s (± 0.44%) ~ 2.62s 2.65s p=0.279 n=6
Total Time 13.88s (± 0.21%) 13.87s (± 0.22%) ~ 13.84s 13.93s p=0.468 n=6
Monaco - node (v18.15.0, x64)
Memory used 347,350k (± 0.00%) 347,365k (± 0.00%) +15k (+ 0.00%) 347,356k 347,372k p=0.031 n=6
Parse Time 2.46s (± 0.43%) 2.46s (± 0.31%) ~ 2.45s 2.47s p=0.273 n=6
Bind Time 0.94s (± 0.00%) 0.94s (± 0.00%) ~ 0.94s 0.94s p=1.000 n=6
Check Time 6.92s (± 0.41%) 6.94s (± 0.50%) ~ 6.89s 6.99s p=0.518 n=6
Emit Time 4.04s (± 0.20%) 4.04s (± 0.46%) ~ 4.01s 4.06s p=0.164 n=6
Total Time 14.36s (± 0.27%) 14.38s (± 0.30%) ~ 14.31s 14.44s p=0.373 n=6
TFS - node (v18.15.0, x64)
Memory used 302,559k (± 0.00%) 302,578k (± 0.01%) ~ 302,551k 302,642k p=0.260 n=6
Parse Time 2.00s (± 1.12%) 1.99s (± 2.34%) ~ 1.94s 2.06s p=0.808 n=6
Bind Time 1.01s (± 1.46%) 1.01s (± 1.36%) ~ 0.99s 1.03s p=0.460 n=6
Check Time 6.26s (± 0.28%) 6.26s (± 0.39%) ~ 6.23s 6.29s p=1.000 n=6
Emit Time 3.59s (± 0.85%) 3.58s (± 0.58%) ~ 3.56s 3.61s p=0.935 n=6
Total Time 12.86s (± 0.22%) 12.86s (± 0.37%) ~ 12.79s 12.93s p=0.872 n=6
material-ui - node (v18.15.0, x64)
Memory used 470,512k (± 0.00%) 470,513k (± 0.00%) ~ 470,478k 470,538k p=1.000 n=6
Parse Time 2.58s (± 0.53%) 2.57s (± 0.75%) ~ 2.54s 2.59s p=0.681 n=6
Bind Time 1.00s (± 0.84%) 1.00s (± 1.51%) ~ 0.97s 1.01s p=0.555 n=6
Check Time 16.64s (± 0.25%) 16.64s (± 0.31%) ~ 16.54s 16.68s p=0.685 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 20.21s (± 0.25%) 20.20s (± 0.31%) ~ 20.08s 20.25s p=0.809 n=6
xstate - node (v18.15.0, x64)
Memory used 512,662k (± 0.02%) 512,596k (± 0.01%) ~ 512,558k 512,630k p=0.298 n=6
Parse Time 3.26s (± 0.54%) 3.27s (± 0.36%) ~ 3.25s 3.28s p=0.737 n=6
Bind Time 1.55s (± 0.49%) 1.55s (± 0.26%) ~ 1.55s 1.56s p=0.389 n=6
Check Time 2.84s (± 0.99%) 2.84s (± 0.62%) ~ 2.82s 2.87s p=1.000 n=6
Emit Time 0.08s (± 4.99%) 0.08s (± 0.00%) ~ 0.08s 0.08s p=0.405 n=6
Total Time 7.73s (± 0.52%) 7.73s (± 0.31%) ~ 7.71s 7.77s p=0.935 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • Angular - node (v18.15.0, x64)
  • Compiler-Unions - node (v18.15.0, x64)
  • Monaco - node (v18.15.0, x64)
  • TFS - node (v18.15.0, x64)
  • material-ui - node (v18.15.0, x64)
  • xstate - node (v18.15.0, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

tsserver

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Compiler-UnionsTSServer - node (v18.15.0, x64)
Req 1 - updateOpen 2,365ms (± 1.27%) 2,377ms (± 1.27%) ~ 2,338ms 2,414ms p=0.688 n=6
Req 2 - geterr 5,410ms (± 1.54%) 5,385ms (± 1.54%) ~ 5,299ms 5,474ms p=0.521 n=6
Req 3 - references 327ms (± 0.83%) 327ms (± 1.62%) ~ 322ms 337ms p=0.515 n=6
Req 4 - navto 274ms (± 1.60%) 278ms (± 1.32%) ~ 273ms 282ms p=0.090 n=6
Req 5 - completionInfo count 1,356 (± 0.00%) 1,356 (± 0.00%) ~ 1,356 1,356 p=1.000 n=6
Req 5 - completionInfo 84ms (± 6.92%) 85ms (± 7.58%) ~ 75ms 90ms p=0.682 n=6
CompilerTSServer - node (v18.15.0, x64)
Req 1 - updateOpen 2,481ms (± 0.88%) 2,495ms (± 1.19%) ~ 2,464ms 2,535ms p=0.575 n=6
Req 2 - geterr 4,133ms (± 1.94%) 4,107ms (± 2.30%) ~ 4,016ms 4,201ms p=0.230 n=6
Req 3 - references 338ms (± 1.63%) 340ms (± 1.72%) ~ 333ms 347ms p=0.413 n=6
Req 4 - navto 283ms (± 0.72%) 281ms (± 0.52%) ~ 279ms 283ms p=0.164 n=6
Req 5 - completionInfo count 1,518 (± 0.00%) 1,518 (± 0.00%) ~ 1,518 1,518 p=1.000 n=6
Req 5 - completionInfo 83ms (± 7.76%) 82ms (± 7.27%) ~ 76ms 89ms p=0.871 n=6
xstateTSServer - node (v18.15.0, x64)
Req 1 - updateOpen 2,591ms (± 0.70%) 2,595ms (± 0.60%) ~ 2,566ms 2,610ms p=0.748 n=6
Req 2 - geterr 1,693ms (± 1.65%) 1,725ms (± 1.89%) ~ 1,679ms 1,760ms p=0.128 n=6
Req 3 - references 108ms (± 5.25%) 115ms (± 8.41%) ~ 105ms 126ms p=0.080 n=6
Req 4 - navto 359ms (± 0.11%) 366ms (± 0.22%) +7ms (+ 1.90%) 365ms 367ms p=0.003 n=6
Req 5 - completionInfo count 2,073 (± 0.00%) 2,073 (± 0.00%) ~ 2,073 2,073 p=1.000 n=6
Req 5 - completionInfo 308ms (± 2.65%) 313ms (± 1.86%) ~ 305ms 320ms p=0.258 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • CompilerTSServer - node (v18.15.0, x64)
  • Compiler-UnionsTSServer - node (v18.15.0, x64)
  • xstateTSServer - node (v18.15.0, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

Startup

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
tsc-startup - node (v18.15.0, x64)
Execution time 152.64ms (± 0.16%) 152.55ms (± 0.18%) -0.09ms (- 0.06%) 151.35ms 155.36ms p=0.000 n=600
tsserver-startup - node (v18.15.0, x64)
Execution time 227.97ms (± 0.16%) 227.84ms (± 0.19%) -0.13ms (- 0.06%) 226.50ms 238.63ms p=0.000 n=600
tsserverlibrary-startup - node (v18.15.0, x64)
Execution time 229.11ms (± 0.17%) 229.13ms (± 0.19%) ~ 227.32ms 235.96ms p=0.992 n=600
typescript-startup - node (v18.15.0, x64)
Execution time 228.43ms (± 0.17%) 228.36ms (± 0.17%) ~ 226.86ms 235.08ms p=0.054 n=600
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • tsc-startup - node (v18.15.0, x64)
  • tsserver-startup - node (v18.15.0, x64)
  • tsserverlibrary-startup - node (v18.15.0, x64)
  • typescript-startup - node (v18.15.0, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

Developer Information:

Download Benchmarks

@rbuckton
Copy link
Member Author

much better

src/compiler/types.ts Outdated Show resolved Hide resolved
@jakebailey
Copy link
Member

This seems good to me, though is it intended that DT still fail? It seems odd that we'd hard error on a JSDoc comment in TS code like this.

@rbuckton
Copy link
Member Author

@typescript-bot run dt

@typescript-bot
Copy link
Collaborator

typescript-bot commented Oct 25, 2023

Heya @rbuckton, I've started to run the parallelized Definitely Typed test suite on this PR at 4774cec. You can monitor the build here.

Update: The results are in!

@rbuckton
Copy link
Member Author

This seems good to me, though is it intended that DT still fail? It seems odd that we'd hard error on a JSDoc comment in TS code like this.

That failure may be related to the change in the first approach, I need to retest to see if it still occurs in the new approach.

@typescript-bot
Copy link
Collaborator

Hey @rbuckton, the results of running the DT tests are ready.
Everything looks the same!
You can check the log here.

Copy link
Member

@jakebailey jakebailey left a comment

Choose a reason for hiding this comment

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

LGTM, I don't think this is breaking given nobody should be depending on the exact values anyway.

I'm half worried that this PR appears to entirely fill up the entirety ModifierFlags's bitwise space, but I'm not sure how we could do this different other than to have another flag prop or something.

@rbuckton
Copy link
Member Author

LGTM, I don't think this is breaking given nobody should be depending on the exact values anyway.

I'm half worried that this PR appears to entirely fill up the entirety ModifierFlags's bitwise space, but I'm not sure how we could do this different other than to have another flag prop or something.

There are still quite a few bits remaining, and we don't add new modifiers all that often. I'm trying to conserve memory as much as possible here, so I'd rather wait to expand into a second property when it becomes absolutely necessary.

@rbuckton rbuckton merged commit 79da510 into main Oct 25, 2023
19 checks passed
@rbuckton rbuckton deleted the fix-42189 branch October 25, 2023 22:24
@rbuckton rbuckton restored the fix-42189 branch October 25, 2023 22:27
@rbuckton rbuckton deleted the fix-42189 branch October 25, 2023 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Milestone Bug PRs that fix a bug with a specific milestone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

getSyntacticModifierFlags return value affected by getEffectiveModifierFlags
3 participants