You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I suddenly started having my intellisense hang indefinitely on a cypress project, and after an extension bisect found ts-type-explorer was the issue. Thankfully I solved the problem by lowering the max recursion depth to 4. I figured the type-structure must have branched out too rapidly, but it made me think there must be a better way to handle recusion calculation overload. My suggestions are:
Only explore and find the types when the user expands that part of the type explorer.
There is no point collecting n-levels depth of type information if the nodes are collapsed, and this approach would prevent the exponential slowdown as depth increases. It would also remove the need to set a hard cap on the depth explorable.
EDIT: I do see that another user asked about this issue, and that the answer was: it was already implemented on some, but tricky to implement on specific types of types
Allow the user to set a calculation timeout at which point to stop further recursing.
This could be used instead of a hard depth stop, particularly if the approach was to calculate level n of recursion for the entire tree, before level n+1. This would fit better with a variety of codebase sizes and complexities, and also let the user know what was going wrong if their computer had ground to a halt.
Also to note - I was having my intellisense hang even when I had not focused the type-explorer tab. This feels like a mis-step, I wouldn't mind a delay when opening the tab, if it meant a more performant codebase the rest of the time. A spinner and a "stop calculation" button would be good UI additions too.
The text was updated successfully, but these errors were encountered:
I am having my whole VSCode hang when @tanstack/react-form is installed. After disabling all extensions one by one, I have figured out that the Typescript Explorer was causing this issue.
Example bare-minimum repo where you can observe the issue:
I suddenly started having my intellisense hang indefinitely on a cypress project, and after an extension bisect found ts-type-explorer was the issue. Thankfully I solved the problem by lowering the max recursion depth to 4. I figured the type-structure must have branched out too rapidly, but it made me think there must be a better way to handle recusion calculation overload. My suggestions are:
Only explore and find the types when the user expands that part of the type explorer.
Allow the user to set a calculation timeout at which point to stop further recursing.
Also to note - I was having my intellisense hang even when I had not focused the type-explorer tab. This feels like a mis-step, I wouldn't mind a delay when opening the tab, if it meant a more performant codebase the rest of the time. A spinner and a "stop calculation" button would be good UI additions too.
The text was updated successfully, but these errors were encountered: