-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Performance regression in 4.0 with semantics-only createWatchProgram
?
#40808
Comments
@dfreeman Can you please provide the repro where this happens.. i ran this on sample and it seems to be using cached diagnostics correctly. |
@sheetalkamat Apologies, the project I mentioned above is private, but I'd (probably foolishly 😄) assumed since it had been reported by several others that it would reproduce easily. Here's a reproduction repo I put together: https://github.com/dfreeman/ts-40808-perf-demo |
Note that the issue is coming up because of changes in #39122 where we emit build info. |
@sheetalkamat will the fix be released as a patch fix for 4.0.x series? |
@DanielRosenwasser is it feasible to take #40880 for 4.0 patch |
Yeah, I think that'd be reasonable. |
The wiki here has a page that outlines ways to programmatically create a watched build, and suggests that
createSemanticDiagnosticsBuilderProgram
is likely preferable tocreateEmitAndSemanticDiagnosticsBuilderProgram
for use cases that aren't interested in emit.The
ember-cli-typescript
package uses the APIs outlined in that wiki page to integrate typechecking results into Ember CLI builds, and there've been several reports of slower re-checks after a file change from folks that have updated totypescript@4
.TypeScript Version:
Search Terms:
createWatchProgram
createSemanticDiagnosticsBuilderProgram
Code
Expected behavior:
Re-checks are at least as fast with
createSemanticDiagnosticsBuilderProgram
as with its counterpart that tracks emit.Actual behavior:
In a project that takes on the order of 15s to typecheck at startup, re-checking takes less than 1s with the above invocation in 3.9, as well as in 4.0 and the most recent 4.1 nightly when using
createEmitAndSemanticDiagnosticsBuilderProgram
.When using
createSemanticDiagnosticsBuilderProgram
in 4.0 and 4.1, though, re-checking consistently takes around 5s.The text was updated successfully, but these errors were encountered: