-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Long running encodedSemanticClassifications-full request #59655
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
Comments
That being said, I'm confused as to this repro; it mentions an eslint error showing up (not TS related?), and the above perf problem was coming from diagnostics themselves, not semantic highlighting. Just running |
The eslint error is only reflective of a performance issue, yes. Though the perf issue seems to originate in TS--specifically in the Schema. I thought it might be a recursion issue. |
I'm not sure where this is happening, but something in this example is attempting to create a union with 628,109 types, 1,733 of which are template literals, and 626,376 are string literals that have to be matched against those template literals. That means needing to do 1,085,509,608 string-to-string-literal inferences. |
Adding in a limiter to bail out when this situation happens points here:
|
Just to show what those strings are, if that helps you narrow down the bad code:
|
Can you try the build on #59759 (comment) to see if that fixes things in general? |
It does not seem to make a difference |
Hm, okay. I rechecked the profile for just a completion call, and most of the time is now spent in auto-imports. vscode-profile-2024-08-26-11-20-10.cpuprofile In my logs, I do not see the call from the issue title taking time:
But do see completion being slow:
Can you turn on logging and send tsserver logs? |
FWIW I tried to solve #56081 with a trie as well but from what I recall, it sped up type checking but the completions were still an issue (like this bug). You can try that bug if you're looking for a repro. |
π Search Terms
@RyanCavanaugh requested that I create a new issue
π Version & Regression Information
β― Playground Link
No response
π» Code
npm i
Command + .
)The warning
React Hook useEffect has a missing dependency: 'getProfile'. Either include it or remove the dependency array.eslint[react-hooks/exhaustive-deps](https://github.com/facebook/react/issues/14920)
should appear on line 26π Actual behavior
2024-08-15 18:57:48.766 [trace] <semantic> Response received: encodedSemanticClassifications-full (210). Request took 155445 ms. Success: true { "spans": [ 467, 11, 2817, 493, 5, 2560, 500, 4, 2089, 509, 10, 2816, 520, 11, 2056, 543, 7, 2089, 552, 10, 2857, 566, 8, 2816, 575, 12, 1536, 600, 6, 2089, 609, 10, 2816, 620, 21, 2056, 686, 10, 2857, 699, 11, 2816, 737, 4, 2560, 743, 8, 2089, 762, 6, 2088, 769, 6, 2560, 776, 11, 2560, 788, 4, 3072, 801, 6, 2561, 819, 5, 2561, 838, 2, 2561, 842, 4, 2088, 848, 10, 2560, 899, 8, 2088, 908, 6, 2576, 918, 10, 2856, 929, 8, 2088, 949, 6, 2088, 956, 6, 2560, 963, 11, 2560, 976, 4, 2088, 987, 9, 2816, 1009, 10, 2856, 1029, 6, 2088, 1036, 6, 2560, 1043, 11, 2560, 1056, 4, 2088, 1124, 7, 2088, 1160, 4, 2561, 1178, 7, 2561, 1205, 8, 2561, 1240, 5, 2561, 1259, 7, 2561, 1286, 8, 2561, 1321, 12, 2561, 1347, 7, 2561, 1374, 8, 2561, 1409, 6, 2561, 1429, 7, 2561, 1456, 8, 2561 ], "endOfLineState": 0 }
encodedSemanticClassifications-full took almost a minute and an half.
π Expected behavior
encodedSemanticClassifications-full should take less than a few seconds.
Additional information about the issue
When I remove the import for Schema, everything seems to work as expected. The Schema is a somewhat complex generated type whose definition is here.
The text was updated successfully, but these errors were encountered: