Ts-jest: RFC: Performance report for each ts-jest version

Created on 31 May 2019  路  12Comments  路  Source: kulshekhar/ts-jest

Topic

This is a discussion issue where users can report any regressions in performance. All the reported cases will be taken care of with high priority.

Helpful solutions for performance improvement:

Follow updated information in documentation at https://kulshekhar.github.io/ts-jest/user/config/isolatedModules

Discussion

Most helpful comment

@ahnpnl I can confirm this beta has a massive performance improvement for us (down to 37 minutes from 5.5 hours with cold cache) 馃帀

All 12 comments

For what it's worth, isolatedModules=true didn't solve the problem for us, nor did setting --maxWorkers=1. We haven't been able to upgrade past version 23 because our build times out due to inactivity. It seems like the specs start out reasonably fast and gradually get slower and slower. When we run Typescript separately it runs relatively quickly. Is there no way to run it up front and use the compiled output? Haven't had a chance to try @babel/preset-typescript, but that's next on our list.

These are the 2 things I did for CI at work:

  • set isolatedModules=true and clear jest cache then perform a dry run. After this run, jest and ts-jest will cache stuffs which will speed up for the next runs.
  • run with maxWorkers=1 or maxWorkers=50%.

They are affected, only the 1st time it takes time because of clearing cache (set isolatedModules from false to true requires clear cache to be affected).

Alternatively, you can use the combo of tsc and babel on compiled js. tsc will take care of type checking and jest will run on js using babel.

1549 will be in alpha version today. Please test and let us know whether it helps.

@ahnpnl

1549 will be in alpha version today. Please test and let us know whether it helps.

We have some problems with d.ts files https://github.com/vkrol/ts-jest-25.5.0-alpha.0-custom-typings.

@ahnpnl

1549 will be in alpha version today. Please test and let us know whether it helps.

We have some problems with d.ts files https://github.com/vkrol/ts-jest-25.5.0-alpha.0-custom-typings.

thanks @vkrol , it will be fixed by #1562

25.5.0-beta.0 was released.

@ahnpnl I can confirm this beta has a massive performance improvement for us (down to 37 minutes from 5.5 hours with cold cache) 馃帀

@ahnpnl I can confirm this beta has a massive performance improvement for us (down to 37 minutes from 5.5 hours with cold cache) 馃帀

I'm very glad to hear that 馃憤

related to this topic. 25.5.1 is out which reverted the changes to boost performance in 25.5.0 because it created so many inconveniences for users.

Therefore, ts-jest has added to doc the instruction for users to boost performance in Performance section https://kulshekhar.github.io/ts-jest/user/config/isolatedModules

Hi folks 馃憢 a few extra improvements for this topic were introduced in v26.1.2 . Would love to hear some feedbacks from you guys 馃檹

isolatedModules: true isn't in the scope of this one :) this one is only about isolatedModules: false

isolatedModules: true isn't in the scope of this one :) this one is only about isolatedModules: false

sry)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ozum picture ozum  路  4Comments

japhar81 picture japhar81  路  3Comments

jbreckmckye picture jbreckmckye  路  3Comments

qm3ster picture qm3ster  路  3Comments

stangerjm picture stangerjm  路  4Comments