-
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
Tests are running much slower in 7.0.0-alpha.1 with --no-cache #213
Comments
Please don't run Jest with In Closing, as this is not the issue. In fact, your tests are running faster now, possibly because of other optimisations made by |
@thymikee --no-cache just exaggerates the time needed to run tests. I use that only to see how long it takes the first time. Even single test runs too long when the cache could not be used for some reason. I think there is some problem, probably something wrong with my setup regarding
results in:
Is that expected behavior? I also played with
|
Cc @wtho |
Interesting, I will have a look at how many times the transform gets called. The implementation of the transformer changed since the last release (modifies assignments instead of decorators), so I will just check the newer implementation. @Ludevik Maybe you can measure the performance another time with the current master? Would be awesome! |
Released latest changes to |
@Ludevik so I checked the example app and it seems to work just fine with the current implementation, every assignment is modified a single time. Just a guess: If jest loads the component several times (e. g. from different test files) and caching is turned off, the file gets processed several times. Maybe you add another log just inside Otherwise it can be ts-jest itself. ts-jest 23.10 is a complete rewrite and they handle things very differently now, so there might be unknown performance issues. We added the transformer to make Angular work with it, but we are not aware of performance issues with ts-jest 23.10 so far. Thanks for sharing and trying out the alpha! Hopefully we get more feedback and can identify the origin of the slowdown. |
@wtho @thymikee thanks. I will write a question to |
FYI, this might be one of the causes of performance |
Also tried upgrade to alpha version and timing difference was impossible to work with, so I had to revert the change. Let's hope that it is going to be fixed inside ts-jest lib. |
My setup:
babel-preset-env: 1.7.0,
jest: 23.6.0,
jest-preset-angular: 7.0.0-alpha.1,
jest-sonar-reporter: 2.0.0,
I am using babel-jest to process
*.js
files.I am trying to upgrade from 6.0.0 -> 7.0.0-alpha.1. I am running jest with:
npm run jest -- --no-cache
and observing that the time required to finish tests goes up from ~120s to around 950s. When i enable the cache, then the first run is slow, but consecutive run is much faster (same as in version 6.0.0) - around 30s.Anyone else experiencing same behavior?
What could be the cause for this, where should i look?
The text was updated successfully, but these errors were encountered: