-
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 in object destructuring with default values referencing other destructured members #48902
Comments
Small Update - I found a better isolation of the issue, it seems there is a hierarchy loop issue, the more properties depending on class MyClass {
constructor({
value1,
test1 = value1.test1,
test2 = value1.test2,
test3 = value1.test3,
test4 = value1.test4,
test5 = value1.test5,
test6 = value1.test6,
test7 = value1.test7,
test8 = value1.test8,
// ...
}) {}
} |
Thanks for the self-contained example! Was able to confirm using |
👋 Hi, I'm the Repro bot. I can help narrow down and track compiler bugs across releases! This comment reflects the current state of this repro running against the nightly TypeScript. ❌ Failed: -
Historical Information
|
The change between 4.5.2 and 4.6.2 occurred at 831b770. |
Repro executes in ~1 second in 4.5 and earlier, ~120 seconds in 4.6 and later 😅 Caused by #46266 |
Doesn't appear to have anything to do with class constructors. This suffers from the same issue: function foo({
value1,
test1 = value1.test1,
test2 = value1.test2,
test3 = value1.test3,
test4 = value1.test4,
test5 = value1.test5,
test6 = value1.test6,
test7 = value1.test7,
test8 = value1.test8,
// ...
}) {} Something appears to have exponentially rising cost. I'll research... |
VS Code Version:
OS:
Steps to Reproduce:
Loading IntelliSense Status
in status bar starts spinning foreverI tried to isolate the issue that seems to be related to operators in constructor, but not always. Sometimes, it appears by commenting/uncommenting other lines.
The text was updated successfully, but these errors were encountered: