Description
🔎 Search Terms
typescript 5.5 performance, slowdown, typescript-eslint
🕗 Version & Regression Information
- This changed between versions 5.4 and 5.5
- This changed in commit or PR Monomorphize allocators for tsserver/public API, just like core compiler #58045 (verified by running our type-aware lints while running
git bisect
on a local typescript repo, it slows down specifically on this commit)
⏯ Playground Link
No response
💻 Code
I've put together a repro in a forked version of the sentry monorepo here: walkerdb/sentry#1. It's using the sentry repo only because it's a large public repo that uses typescript-eslint.
🙁 Actual behavior
When running typescript-eslint's type-aware lint rules in a large monorepo with typescript 5.5, we observe lint times between 1.3x to 3x worse than when running the exact same rules and the same config under typescript 5.4. The slowdown seems to be entirely coming from the monomorphized objects change in the ts 5.5 release.
🙂 Expected behavior
There should be no performance impact when moving from typescript 5.4 to 5.5.
Additional information about the issue
We've submitted a bug report to typescript-eslint but we're also reporting here since the slowdown can be pinpointed to a specific typescript change.
- typescript-eslint issue: Bug: using with typescript v5.5 slows down linting by 2.3x typescript-eslint/typescript-eslint#9474
- the PR that introduces the slowdown: Monomorphize allocators for tsserver/public API, just like core compiler #58045
Also attaching some before/after update perf traces via 0x that show the extra time is coming largely from typescript internals. The highlighted boxes show the specific part of the process that has ballooned in runtime. I'm happy to share the actual traces with maintainers if they'd be useful in debugging.
ts 5.4 | ts 5.5 |
---|---|
![]() |
![]() |