RTKQ Typescript Compiler Performance issue #4683
Replies: 3 comments
-
Just to check, what RTK version are you on? We did do some perf improvements to this last year: That was released in https://github.com/reduxjs/redux-toolkit/releases/tag/v1.9.7 . But yeah, if you've got 2600 endpoints, I'm not surprised that's slow. |
Beta Was this translation helpful? Give feedback.
-
Do you experience the same level slowdown in VSCode? IntelliJ doesn't always use the official TypeScript language server, but their own "faster" implementation. |
Beta Was this translation helpful? Give feedback.
-
the benchmarks are generated directly using tsc (Version 5.3.3).
We noticed it with around 30 endpoints because the performance had already degraded to the point where the developer experience suffered. However, the problem grows (almost) linearly with the number of endpoints. with 2600 the typescript language server is not useable any more (~40 sec. delay).
we are on 2.2.1 |
Beta Was this translation helpful? Give feedback.
-
I noticed that my IDE takes quite a long time to resolve types. Even when RTKQ isn’t directly involved, tracing shows that it still takes an extremely long time.
Atm. i've around 30 endpoints and it takes 600ms on every keystroke. i tested it with ~300 endpoints and my IDE (and any kind of typechecking) takes ~3500ms. i am using a freaking fast imac studio (...).
with 2600 endpoints it takes 27799ms for intelliJ (phpstorm) to resolve a type (even if RTKQ is not directly involved).
the code is quite simple:
than i've
With just 30 endpoints, you can already feel how the developer experience across the entire project declines. Are we doing something wrong here? For larger projects, this would have to be a showstopper, wouldn’t it?
bench_2600.txt.zip
bench.txt.zip
how to reproduce:
Beta Was this translation helpful? Give feedback.
All reactions