Add batched version for several API functions.#4555
Open
dragomirtitian wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds batched variants of several checker-related RPC/API methods to reduce IPC overhead when many small API calls are needed (notably in the native-preview client APIs).
Changes:
- Added new protocol methods + server-side handlers to execute multiple checker queries within a single request.
- Extended the native-preview sync/async
CheckerAPIs with overloads that accept arrays for batching. - Added sync + async test coverage validating the new batched behaviors for several checker methods.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/api/session.go | Adds request routing and server-side implementations for new batched checker operations. |
| internal/api/proto.go | Introduces new RPC method names, unmarshaling entries, and new batched-parameter structs. |
| _packages/native-preview/src/api/sync/api.ts | Adds batched overloads to the sync Checker API, issuing new batched RPC requests. |
| _packages/native-preview/src/api/async/api.ts | Adds batched overloads to the async Checker API, issuing new batched RPC requests. |
| _packages/native-preview/test/sync/api.test.ts | Adds sync tests validating the new batched checker API behaviors. |
| _packages/native-preview/test/async/api.test.ts | Adds async tests validating the new batched checker API behaviors. |
9d84988 to
b1c33f3
Compare
b1c33f3 to
4d2a4ff
Compare
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.
While porting our internal tool to use the new GO api we found that the overhead of IPC is often the dominating cost in a API call. To improve performance we added batched versions several API we use. These have made a huge difference in the performance of our code (once we made sure to aggressively batch API calls)