-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
[PERFORMANCE]: TS takes several seconds to validate types resulting in poor DX #54939
Comments
Please provide a self-contained repro; we do not have time to dig into large external typings to figure out if they're written performantly or not. |
@mhevery #55224 will mitigate a good bit of this. Not all, but in your specific example's case about 50% overall of a If you want to try it out before it's in a release, you can install the package from #55224 (comment) and then switch your editor to use it instead of what's built into VS Code (or wait for a nightly). |
@jakebailey and I had further discussion around this tonight. Both his PR for recursiveTypeRelatedTo and drizzle's recent typing updates removing HKTs have made a significant improvement, however I'm still seeing situations where intellisense is slowing down quite a bit (though, notably, not tsc). Moving from 5.1 to nightly in VS code on my "real" project I did see the reported ~50% speedup - it's possible the issue have may moved somewhere else now (and, if so, may be worth a separate issue, but starting with a comment here). The reproduction I have is similar to the original here, though larger: https://stackblitz.com/edit/stackblitz-starters-uaglzu?file=index.ts Try waiting at every I'm actively working on trying to build out a more minimal reproduction extracted from drizzle. So far a big thing I've noticed is that a big contributor is the |
Bug Report
π Search Terms
π Version & Regression Information
β― Playground Link
Playground link with relevant code
Related issue: drizzle-team/drizzle-orm#870
π» Code
I understand that this issue uses an external library,
drizzle
which is the source of performance problems. However, I think it would be useful for the TS team to see how people use types in real world and to see if either thedrizzle
team can fix the types to be better performant or the TS team can do something to better handle the use cases used bydrizzle
.π Actual behavior
Slow (2-3 second) TS validation time. This interferes with code-completion and makes for a bad DX.
π Expected behavior
Type validation should stay performant.
The text was updated successfully, but these errors were encountered: