-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
ts-jest with cleared cache is reading package.json in node_modules over and over - start takes forever #16703
Comments
Update: I played a bit around and wrote a very basic [destructive] cache into The interesting thing though is, that after that I got a much clearer cpu profile: |
Update2: I updated the demo repository to ionic 4.0.0-rc.0 and typescript to 3.2.2. It now takes around 45 seconds in the gitlab build pipeline so if anybody wants to try his luck, you are welcome. |
Update3: @paulstelzer This was caused by a combination of uncached file reads and now by default enabled language services in ts-jest. It has nothing to do with ionic, ionic was just the package with the most require-statements / separate modules in node_modules. |
so this can be closed now? |
@paulstelzer yes |
Thank you for the resarch :) |
@paulstelzer I think the only thing you could have realistically done is what you alread did: remove the icons from the build chain. ts-jest was probably reading the package.json again and again for each icon... |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
Bug Report
I just updated to ts-jest@23.10.5 from somewhere around ~23.1.3 which increased the runtime of my test suite from 10ish seconds [on the first run / with cleared cache] to over 40 seconds - with cache around 2.5s.
It's possible that this is a ts-jest (or even typescript) issue BUT after I created a demo-repository I realized that the problem went away after I removed ionic from the project.
So ionic probably has something to do with it.
Ionic version:
[x] 4.x
Current behavior:
The initial start of jest takes around 30 seconds on an almost empty repository with ionic included.
Expected behavior:
The initial start of jest shouldn't take that long.
Steps to reproduce:
Related code:
https://gitlab.com/Farbdose/ts-jest-multiple-fileread
Other information:
You can find the original issue at kulshekhar/ts-jest#908
Possibly related #15695: I had to use the fix described there to actually get jest running at all.
Ionic info:
The text was updated successfully, but these errors were encountered: