Skip to content

Add batched version for several API functions.#4555

Open
dragomirtitian wants to merge 1 commit into
microsoft:mainfrom
dragomirtitian:add-more-batched-apis
Open

Add batched version for several API functions.#4555
dragomirtitian wants to merge 1 commit into
microsoft:mainfrom
dragomirtitian:add-more-batched-apis

Conversation

@dragomirtitian

Copy link
Copy Markdown

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)

Copilot AI review requested due to automatic review settings July 7, 2026 16:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Checker APIs 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.

Comment thread _packages/native-preview/src/api/sync/api.ts Outdated
Comment thread _packages/native-preview/src/api/sync/api.ts
Comment thread _packages/native-preview/src/api/sync/api.ts Outdated
Comment thread _packages/native-preview/src/api/sync/api.ts Outdated
Comment thread _packages/native-preview/src/api/async/api.ts Outdated
Comment thread _packages/native-preview/src/api/async/api.ts Outdated
Comment thread _packages/native-preview/src/api/async/api.ts Outdated
Comment thread _packages/native-preview/src/api/async/api.ts Outdated
Comment thread internal/api/proto.go Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Comment thread _packages/native-preview/src/api/sync/api.ts Outdated
Comment thread _packages/native-preview/src/api/sync/api.ts Outdated
Comment thread _packages/native-preview/src/api/sync/api.ts Outdated
Comment thread _packages/native-preview/src/api/sync/api.ts Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants