Open
Description
Current behavior
Type check is slow in incremental mode on watch mode's subsequent runs (not on the first run).
Expected behavior
Type check in incremental mode on watch mode's subsequent runs (not on the first run) has the same or comparable performance as in non-incremental mode.
Steps to reproduce the issue
- Set
"incremental": true
in tsconfig. - Set
build: true, mode: 'write-references'
in fork-ts-checker options, as in the guide. - Run
pnpm start
. - After compilation and type check finish, modify src/index.tsx (e. g. add an empty comment) and save file.
- Note that after watch mode recompilation fork-ts-checker's type check finishes in approximately 2 seconds after compilation finishes. You may modify and save src/index.tsx multiple times to make sure.
- Stop
pnpm start
process. - Remove
"incremental": true
from tsconfig,build: true, mode: 'write-references'
from fork-ts-checker options. - Repeat steps 3-4.
- Note that after watch mode recompilation fork-ts-checker's type check finishes within some milliseconds after compilation finishes. It looks as if it's almost immediate. You may modify and save src/index.tsx multiple times to make sure. Compare that to the results of step 5.
Please note that such a small value of 2 seconds is only on the reproduction repository. On a real-life project type check ends 35 seconds after compilation ends. After every file save.
At the same time without incremental mode type check finishes within a couple of seconds after compilation ends.
Is that the expected behaviour of incremental mode? Or is it a bug?
Issue reproduction repository
https://github.com/EugeneGarbuzovPublic/slow-incremental
Environment
- fork-ts-checker-webpack-plugin: 9.0.2
- typescript: 5.3.3
- eslint: 8.56.0
- webpack: 5.89.0
- os: Windows 11 Pro 22H2 22621.2861