-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Perf regression: conditional type assignability #43485
Comments
FYI @andrewbranch, since it looks like the same PR caused #43249. |
Well, y'see, now we try to see if |
So, there's a quick and dirty "fix" - increasing the constant allowed dupe count in |
And whatddoyouknow, I've already opened a PR with the fix 4 months ago to fix a different issue: #41821 |
Hi, I stumbled upon this issue when looking for a cause of a very slow compilation performance when using an open source project of mine. Let me know if an additional reproduction of slow performance with conditional types would help, I could share that easily. Thanks for working on fixing this! |
…rease on change in value (#41821) * Track source and target relationship stack depth seperately, only increase on change in value * Add baselines for test from #43485 * Bail on unwrapping conditional constraints on the source side when the source conditional is already known to be spooling out of control * More usage of isDeeplyNestedType to block _specifically_ conditional recursion on only one side * Negative cases of getNarrowedType that match the exact type should be filtered out, even when generic * Add test and fix for #44404 * Swap to manually specifying left and right recursion * Rename Left -> Source, Right -> Target Co-authored-by: Andrew Branch <andrew@wheream.io>
Repro
npm install @types/react
index.ts
tsc index.ts --noEmit --skipLibCheck --extendedDiagnostifcs
Effect
Check time increased from ~0.5s in b2d1f53 to ~7.0s in 2643e65 (aka #30639).
Repro is reduced from a variance check of React's ComponentProps.
The text was updated successfully, but these errors were encountered: