fix(check-types): batch getDiagnostic calls to avoid overwhelming tsserver#10180
Merged
davidfirst merged 1 commit intomasterfrom Feb 3, 2026
Merged
fix(check-types): batch getDiagnostic calls to avoid overwhelming tsserver#10180davidfirst merged 1 commit intomasterfrom
davidfirst merged 1 commit intomasterfrom
Conversation
Closed
4 tasks
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a performance and reliability issue where tsserver becomes overwhelmed when type-checking workspaces with many components. The fix implements batching for getDiagnostic calls, processing files in groups of 50, which resolves the tsserver overload issue and provides a ~35% performance improvement (33s vs 50s for 138 components).
Changes:
- Added optional
batchSizeparameter togetDiagnostic()method inTsserverClient - Implemented batch processing logic that splits large file sets into smaller chunks
- Applied batching in the
check-typescommand when file count exceeds 50
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| scopes/typescript/typescript/cmds/check-types.cmd.ts | Added batch size constant and conditional batching logic to avoid overwhelming tsserver with large file sets |
| scopes/typescript/ts-server/ts-server-client.ts | Extended getDiagnostic with optional batching capability, processing files in chunks when batch size is specified |
GiladShoham
approved these changes
Feb 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When running
bit check-typeson workspaces with many components, tsserver can become overwhelmed and fail to detect type errors. This fix batches thegetDiagnosticcalls into groups of 50 files.Bonus: ~35% performance improvement (33 sec vs 50 sec for 138 components).
Changes
batchSizeparameter togetDiagnostic()methodcheck-typescommand for large file sets