-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Regression performance compiling types in version 5.4.2 #57710
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
Comments
Could u share a repro case of this problem? |
The number of instantiations went up over a hundredfold π± |
If you can reproduce this consistently, consider bisecting using https://www.npmjs.com/package/every-ts. |
I was able to pinpoint the exact commit which the performance problem was started. 8d1fa44 is the first bad commit
|
Unfortunately, I cannot share a repro for this problem as this is an internal closed-source project from my company. |
Sure thing, I will work on creating a reproducible for this issue. It may take a while as our codebase is quite large π |
I sent a PR to revert the change, but it's likely that the underlying bug was unrelated, and exposed by this change. @weswigham believes it is possible to construct a failure that relies exclusively on functions, not on constructors. Long-term, we should isolate and fix the underlying bug and re-apply this change. |
@georgekaran would one of the TS team at Microsoft be able to sign an NDA to get access to your code? Then we could isolate the problem and produce a repro that's not linked to your code. |
Even if you can't share the code for now, can you try running tsc via https://www.npmjs.com/package/pprof-it? The profile won't include any code, and if you enable |
I just want to chime in and say that I think I'm encountering the same issue, however updating to 5.4.3 hasn't fixed the problem. I'm still seeing the error:
I'm actually seeing this when running ESLint, but I've been able to track it down to something related to the TypeScript config that's being used. Using the same config that worked fine with TS 5.3 will cause the OOM errors in TS 5.4. Changing that config to exclude certain directories (and hence reducing the overall size of the project) avoids the OOM errors. Unfortunately, I also cannot share a repro for the same reasons (closed-source, company project, etc), and there's next to no chance of an NDA being allowed. I'll see what I can do to get a simpler reproduction though. |
I would definitely recommend using every-ts and linking it in to bisect, if it's reproducible. But I would doubt that your issue is related; typically bugs like this aren't, but a bisect would say . |
@jakebailey Looks like you're right about what I'm seeing being a different bug. Commit 8d1fa44 doesn't exhibit the behavior that I'm seeing.
I was able to successfully use Edit: #58011 is the new issue. |
Sorry, I commented on a couple of other old issues before I read some comments about trying to group things by at least versions (in my defense, there's a lot of OOM issues open π ) -- Some basic relative info: |
Not sure what you mean; we want new issues for different OOMs because they're very likely unrelated, unless you've bisected the problem to the same thing as this particular issue. |
Right, gotcha, well that's kinda difficult in my case as it's only happening on GH Actions :/ (thx for the quick reply btw!) |
|
Just wanted to give my two cents as I'm also experiencing the issue and hoping it will help in resolving the issue. Following the guidelines here, I generated traces for running The local build does not run oom. Both the local and the docker traces however reveal large recursive trace events for I'm running this with |
π Search Terms
"regression", "5.4.2", "performance"
π Version & Regression Information
β― Playground Link
No response
π» Code
Extended diagnostics in version 5.4.2
Extended diagnostics in version 5.3.3
π Actual behavior
The type validation using
tsc --noEmit
increase more than 20 times using the version5.4.2
comparing with the version5.3.3
.In the CI is always hitting the heap memory limit:

π Expected behavior
I expected the compilation to be equivalent in both versions, but it was more than 20 times slower.
Additional information about the issue
No response
The text was updated successfully, but these errors were encountered: