-
Notifications
You must be signed in to change notification settings - Fork 309
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
[Bug]: Performance regression in 14.2.0 and 14.2.1 #2886
Comments
ahnpnl
added
🐛 Bug
Confirmed
Bug is confirmed
and removed
Bug Report
Needs Triage
labels
Dec 3, 2024
Thanks, indeed I could see the issue. I added a perf test to the fix PR which should be able to guard us from future changes which impacts performance. |
ahnpnl
added a commit
that referenced
this issue
Dec 3, 2024
As reported, the perf issue is caused by the introduction of an extra `Program` instance to fetch to AST transformers next to the hidden `Program` behind `ts.transpileModule`. We should only use one instance of `Program` therefore we have to manually copy the codes of `ts.transpileModule` to use for our case. Fixes #2886
ahnpnl
added a commit
that referenced
this issue
Dec 3, 2024
As reported, the perf issue is caused by the introduction of an extra `Program` instance to fetch to AST transformers next to the hidden `Program` behind `ts.transpileModule`. We should only use one instance of `Program` therefore we have to manually copy the codes of `ts.transpileModule` to use for our case. Fixes #2886
ahnpnl
added a commit
that referenced
this issue
Dec 3, 2024
As reported, the perf issue is caused by the introduction of an extra `Program` instance to fetch to AST transformers next to the hidden `Program` behind `ts.transpileModule`. We should only use one instance of `Program` therefore we have to manually copy the codes of `ts.transpileModule` to use for our case. Fixes #2886
Thank you so much!! It's very much appreciated 😄 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
14.4.1
Steps to reproduce
As this is a performance issue, it's really difficult to reproduce this outside of our repo as you need a large amount of source files and tests to see the problem.
Expected behavior
Performance does not change between versions
Actual behavior
After upgrading from
14.1.1
to14.4.1
we noticed a massive performance hit in our unit test times, where everything got more than twice as slow.We managed to track down the source of the slow performance to these commits:
Once we reverted both of these commits locally, our test times returned to what they were on the previous version.
As these commits were just refactors, would it be possible to just revert these 2 commits and restore the previous performance? The only test that fails when I did this locally, was this one but I don't think we need to access the type at runtime as we are using an injection token, so I think it's fine for that to be compiled to
undefined
.Additional context
We are using the
isolatedModules: true
flag in our jest config to disable type-checkingEnvironment
The text was updated successfully, but these errors were encountered: