You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
Seems like the issue is in the typescript.build option.
I tried setting only the mode: 'write-references' option and I did not set the build: true option.
Now on our production project the whole build (including the whole type check) consistently takes ~104 seconds. And the issue with subsequent type check runs is gone, subsequent type checks finish almost instantly. With incremental mode turned off the whole build consistently took ~112 seconds.
And with only mode: 'write-references' being set without the build: true the plugin emits the .tsbuildinfo file perfectly fine, in spite of what is written in the docs.
I tried setting mode: 'write-tsbuildinfo' as well, and it seems like it works just the same way as mode: 'write-references' in my case. Again, in spite of what is written in the docs. The build still takes ~104 seconds.
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
"incremental": true
in tsconfig.build: true, mode: 'write-references'
in fork-ts-checker options, as in the guide.pnpm start
.pnpm start
process."incremental": true
from tsconfig,build: true, mode: 'write-references'
from fork-ts-checker options.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
The text was updated successfully, but these errors were encountered: