Open finnmerlett opened 6 months ago
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:
https://github.com/virtuallyunknown/tanstack-form-performance
https://github.com/mxsdev/ts-type-explorer/assets/24871108/00444bd4-cea7-4a01-9fcf-23c6216e443d
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.