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
Watching a project using --build takes longer to compile than omitting the --build option. The difference could be up to multiple seconds, depending on the project size.
Here is the trace for my sample repo running tsc --build tsconfig.json --watch after saving notImported.ts trace-slow.txt
Here is the trace when running tsc --project tsconfig.json --watch and saving the same file. trace_fast.txt
The big difference seems to be that --build doesn't run tryReuseStructureFromOldProgram.
I tried to poke around in the code and it seems that the program state gets released during emitBuildInfo
π Expected behavior
Watching using tsc --build --watch should be able to reuse the last program state to speed up compile times
The text was updated successfully, but these errors were encountered:
Bug Report
π Search Terms
tsc, watch, --build, performance, tryReuseStructureFromOldProgram
π Version & Regression Information
β― Playground Link
Repo link
π» Code
n/a
π Actual behavior
Watching a project using --build takes longer to compile than omitting the --build option. The difference could be up to multiple seconds, depending on the project size.
Here is the trace for my sample repo running
tsc --build tsconfig.json --watch
after saving notImported.tstrace-slow.txt
Here is the trace when running
tsc --project tsconfig.json --watch
and saving the same file.trace_fast.txt
The big difference seems to be that --build doesn't run tryReuseStructureFromOldProgram.
I tried to poke around in the code and it seems that the program state gets released during emitBuildInfo
π Expected behavior
Watching using tsc --build --watch should be able to reuse the last program state to speed up compile times
The text was updated successfully, but these errors were encountered: