-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Perf regression: preserving union aliases #43422
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Note that actual emotion has |
FYI @ahejlsberg |
The speedup from inlining the .d.ts file predates this change, so I'll investigate that separately. Edit: going back as far as 3.6, check time is ~1.2s for separate files and ~0.8s for a combined file. |
From offline discussion, this is a pathological example and the slowdown is regrettable but expected. However, @weswigham has some ideas for potential improvements. |
Do note that the same issue as #43437 dominates this repro when First off, pretty much all of the check time is spent validating export interface CSSObject extends CSSPropertiesWithMultiValues, CSSOthersObject {} - namely, ensuring that all 783 properties from interface ArrayCSSInterpolation extends Array<CSSInterpolation> {} as equivalent to Array<CSSInterpolation> quickly. That's #43624. |
I'm seeing ~1.5s of check time in 0c58ede and ~5s of check time in 6aeb8c1 (aka #42149).
Note that the repro is really brittle - virtually any change causes the check time to drop dramatically (including: inlining the .d.ts contents in the .ts file, using a type alias for the array type, even dropping the
width
property).The real
CSSObject
type is from https://github.com/emotion-js/emotion.index.ts
emotion.d.ts
Note that you'll need to
npm install csstype
.Command:
tsc index.ts -skipLibCheck -noEmit -extendedDiagnostics
The text was updated successfully, but these errors were encountered: