recursiveTypeRelatedTo_DepthLimit - diagnosing poor performance in TS 4.5+ #47208
Labels
Bug
A bug in TypeScript
Duplicate
An existing issue was already created
Rescheduled
This issue was previously scheduled to an earlier milestone
Milestone
Bug Report
🔎 Search Terms
RangeError: Maximum call stack size exceeded
recursiveTypeRelatedTo_DepthLimit
Vincit/objection.js#2177
Vincit/objection.js#2178
🕗 Version & Regression Information
💻 Code
package.json
code
Default tsconfig.
🙁 Actual behavior
Open VS Code. Place cursor after the period on the query line. Invoke suggestions. "Loading.." takes about 5 seconds. At times hovering over "k" to look at the type also shows the same slow "Loading.." behavior. TS Server log shows this:
At other times it shows something like this
I've used --generateTrace and had a look at it. There is a "recursiveTypeRelatedTo_DepthLimit" event during structuredTypeRelatedTo which I'm guessing may be the underlying issue. Is this the likely culprit? What would be the best way to diagnose this? Also, why is TSC fast while tsserver inference is slow? The type-checking part of the compliation (checkSourceFile in the trace) only takes 1.5 seconds.
The text was updated successfully, but these errors were encountered: