rsnext/packages
Shu Ding d54d43d4ed
Use only 1 worker for type checking and linting (#45639)
During build, there's no need to start N workers for type checking and
linting, because there's no concurrency at all for these tasks (both
TypeScript and ESLint are checking all files globally).

During my test of `next build` for a small size project of 5 pages, this
change reduces the peak memory usage by 545MB (as each worker holds a
huge dependency chain). Before (there are too many worker threads
initiated):

<img width="1278" alt="before"
src="https://user-images.githubusercontent.com/3676859/217116925-5594a45c-f1bb-4d11-8699-f6fe12ce7ee5.png">

After:

<img width="1189" alt="CleanShot-2023-02-07-WfQTnB1D@2x"
src="https://user-images.githubusercontent.com/3676859/217116940-a08a256e-b80d-4836-8b97-2837c845435e.png">

It improves the CPU usage as well.

In the future we can spin up multiple workers and assign sub-task for
each, but that only makes sense when the number of pages is large.

NEXT-470
2023-02-06 17:06:18 -08:00
..
create-next-app v13.1.7-canary.6 2023-02-06 15:42:44 +01:00
eslint-config-next v13.1.7-canary.6 2023-02-06 15:42:44 +01:00
eslint-plugin-next v13.1.7-canary.6 2023-02-06 15:42:44 +01:00
font Update @next/font/google data (#45622) 2023-02-06 17:24:25 +00:00
next Use only 1 worker for type checking and linting (#45639) 2023-02-06 17:06:18 -08:00
next-bundle-analyzer v13.1.7-canary.6 2023-02-06 15:42:44 +01:00
next-codemod v13.1.7-canary.6 2023-02-06 15:42:44 +01:00
next-env v13.1.7-canary.6 2023-02-06 15:42:44 +01:00
next-mdx v13.1.7-canary.6 2023-02-06 15:42:44 +01:00
next-plugin-storybook v13.1.7-canary.6 2023-02-06 15:42:44 +01:00
next-polyfill-module v13.1.7-canary.6 2023-02-06 15:42:44 +01:00
next-polyfill-nomodule v13.1.7-canary.6 2023-02-06 15:42:44 +01:00
next-swc v13.1.7-canary.6 2023-02-06 15:42:44 +01:00
react-dev-overlay v13.1.7-canary.6 2023-02-06 15:42:44 +01:00
react-refresh-utils v13.1.7-canary.6 2023-02-06 15:42:44 +01:00