-
-
Notifications
You must be signed in to change notification settings - Fork 6.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
when coverage is enabled, jest takes 40x more time to run #2586
Comments
Unfortunately without more info there is nothing at all we can do to help. Please send us a repro. At Facebook we use coverage on thousands of test suites and we have not experienced similar issues. However, @DmitriiAbramov did run into some issues with babel in the latest version of Jest. Does this repro in Jest 18.0.0? |
Also @DmitriiAbramov is working on async coverage reporters which should make it even faster for larger test suites, but it's just a start: #2512 |
some of the reasons why coverage can be slow:
|
actually it doesn't look like you're covering a lot of files, so i assume it's either the cache issue or a bug on our side. |
@jwbay @DmitriiAbramov @hzoo (@ party, sorry). note about caching and performanceOne thing worth noting about how https://github.com/istanbuljs/nyc/blob/master/index.js#L94 This results in a significant improvement in test speeds, given that tests tend to require the same files a ridiculous number of times. In the case of the npm CLI, when I know babel itself has a cache? is there a way we could take advantage of this in Jests' test-suite, and projects that rely on Jest? |
@bcoe we cache transform results after the first run in Jest as well, so we are doing all of this already. |
Also, weren't you supposed to be on vacation? ;D |
there's one thing we can improve actually. here's an example:
so in some cases we transform the same file multiple time. we can probably fix it by using a file system lock.
|
@DmitriiAbramov we should probably do that; yes, but at the same time I don't think that has significant impact on performance. I guess it can be tested easily by running Jest with |
How to run a case multiple times multiple source files in jest?@cpojer |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Unfortunately I can't share the whole project, but to illustrate:
this is on jest
18.1.0
The text was updated successfully, but these errors were encountered: