-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Building performance is slowdown #28025
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
Looking at that code again, I don't know how it could cause a noticeable slowdown. That would probably require thousands or millions of files in your program. How are you running tsc to hit that path of the code? |
The count of files in the project ~10k. I am using @angular/cli. And I tried to set the |
After investigating further, it turns out this code may be executed for each import (or type reference directive) in every file of the project (depending on the kind of change). |
I build typescript from your pull request, and used it to build my application. Now the build time is the same as before. 👍Thanks for the quick response. |
Can we release this please ? |
This should be available in TypeScript 3.1.6. Thanks @ajafff! |
Could we get updated VS installer for 3.1.6: https://www.microsoft.com/en-us/download/details.aspx?id=55258? |
Pinging again. It's not obvious how to apply the contents of 3.1.6 source on top of the installer linked above. Is it just a matter of copying over and overriding tsc.js+tsc.exe? Is there anything else that needs to be copied over? At the very least, I'd like to hear from one of the devs that it won't break anything. A diff of tsc.js between the two version really lights up because the source contains comments. |
TypeScript Version: 3.2.0-dev.201xxxxx
Search Terms:
performance, slowdown, degradation
Code:
After upgrading to typescript 3.1.3, our application has been building for a very long time. The total time has increased tenfold. By profiling the build, I found the reason for the slowdown in performance.
The screenshot shows a call to this method:
https://github.com/Microsoft/TypeScript/pull/26192/files#diff-08a3cc4f1f9a51dbb468c2810f5229d3R968
When I rolled back the commit changes, the performance problem was solved. But I don’t know how to fix that and so that the PR assertion pass:
https://github.com/Microsoft/TypeScript/pull/26192/files#diff-6f2ace9c4058a2bb2afe0560f9990e33R402
Expected behavior:
Performance improvement
Actual behavior:
Performance is slowdown
Related Issues:
#26192
The text was updated successfully, but these errors were encountered: