Skip to content
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

Speed up performance massively with --maxWorkers=1 #1044

Closed
AlCalzone opened this issue Mar 29, 2019 · 7 comments
Closed

Speed up performance massively with --maxWorkers=1 #1044

AlCalzone opened this issue Mar 29, 2019 · 7 comments

Comments

@AlCalzone
Copy link

Issue :

This is not really an issue but rather a solution that could be mentioned in the docs.
I've been a bit annoyed with the performance of ts-jest. The VSCode jest plugin and watch mode were each taking 20-30s each run with the default config on a small-to-medium-sized project.

This is with the default 2 workers:

Test Suites: 1 skipped, 30 passed, 30 of 31 total
Tests:       8 skipped, 15 todo, 291 passed, 314 total
Snapshots:   0 total
Time:        24.353s
Ran all test suites.

Note: This is a computer with decent specs and 4 CPUs. I changed the command line to include --maxWorkers=1:

Test Suites: 1 skipped, 30 passed, 30 of 31 total
Tests:       8 skipped, 15 todo, 291 passed, 314 total
Snapshots:   0 total
Time:        3.325s, estimated 45s
Ran all test suites.

which is a massive performance improvement.

@ahnpnl
Copy link
Collaborator

ahnpnl commented Mar 30, 2019

PR is welcome for README 😀

@bbugh
Copy link

bbugh commented Apr 30, 2019

Wow, thank you for this, it is a massive improvement. I wonder what ts-jest is doing that causes this.

@ahnpnl
Copy link
Collaborator

ahnpnl commented Apr 30, 2019

#1049 is one of the issues I think, I don't know which else causes perf issues.

@kbrock84
Copy link

kbrock84 commented May 3, 2019

I ran into this issue as well.

Would you consider adding a Known Issues section to the README and include this?

I can submit a PR for this if needed, but Maybe we should wait until #1049 is merged to decide.

@ahnpnl
Copy link
Collaborator

ahnpnl commented Sep 10, 2019

I ran into this issue as well.

Would you consider adding a Known Issues section to the README and include this?

I can submit a PR for this if needed, but Maybe we should wait until #1049 is merged to decide.

#1049 is in master now. You can test it locally.

Besides, setting isolateModules to true also speeds up a lot

@ahnpnl
Copy link
Collaborator

ahnpnl commented Jan 13, 2020

close as superseded by #1115

@ahnpnl ahnpnl closed this as completed Jan 13, 2020
@ahnpnl
Copy link
Collaborator

ahnpnl commented Apr 21, 2020

FYI: #1549 will be in alpha version of ts-jest (possibly today). Anyone who is using ts-jest please help to test the alpha version and give us some feedbacks for #1115

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants