Repository navigation
fix: only check for watchman existence once per process - #14826
Conversation
✅ Deploy Preview for jestjs ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
this has nothing to do with the other fix, just sneaking it in as #14804 missed it
| private _cachePath = ''; | ||
| private _changeInterval?: ReturnType<typeof setInterval>; | ||
| private readonly _console: Console; | ||
| private _isWatchmanInstalledPromise: Promise<boolean> | null = null; |
There was a problem hiding this comment.
this made the check happens once per project, while we now do it once per module scope (i.e. once per worker/thread/process)
| ### Performance | ||
|
|
||
| - `[*]` [**BREAKING**] Bundle all of Jest's modules into `index.js` ([#12348](https://github.com/jestjs/jest/pull/12348), [#14550](https://github.com/jestjs/jest/pull/14550) & [#14661](https://github.com/jestjs/jest/pull/14661)) | ||
| - `[*]` [jest-haste-map] Only spawn one process to check for `watchman` installation ([#14826](https://github.com/jestjs/jest/pull/14826)) |
There was a problem hiding this comment.
hah, totally wrong format 😅
should be
`[jest-haste-map]` Only spawn one process to check for `watchman` installation ([#14826](https://github.com/jestjs/jest/pull/14826))|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
While looking at #14818, I noticed that we spawned a check for
watchmanfor every single project as well.before:

After:
~440ms to ~8ms in this extreme example
The call to
watchmanitself is still about 14ms of course, but it happens outside of thebuildcalls. This means that if you install watchman while Jest is running, that won't be picked up. But I think that's perfectly fine.We should try to fix the
createWatchercall as wellTest plan
CI