Skip to content

perf(desktop): unbatch host-service tRPC client#3879

Merged
Kitenite merged 1 commit intomainfrom
trpc-batching-perf
Apr 29, 2026
Merged

perf(desktop): unbatch host-service tRPC client#3879
Kitenite merged 1 commit intomainfrom
trpc-batching-perf

Conversation

@Kitenite
Copy link
Copy Markdown
Collaborator

@Kitenite Kitenite commented Apr 29, 2026

Switch host-service-client from httpBatchLink to httpLink so calls to the local host service no longer wait on the slowest procedure in a batch.

Description

Related Issues

Type of Change

  • Bug fix
  • New feature
  • Documentation
  • Refactor
  • Other (please describe):

Testing

Screenshots (if applicable)

Additional Notes


Summary by cubic

Use httpLink for the desktop host-service tRPC client instead of httpBatchLink so local RPC calls resolve independently and no longer wait for the slowest request in a batch. This reduces latency for fast procedures and speeds up the UI.

Written for commit 31abdfb. Summary will update on new commits. Review in cubic

Summary by CodeRabbit

  • Refactor
    • Optimized internal request handling for host service communication to improve performance.

Switch host-service-client from httpBatchLink to httpLink so calls
to the local host service no longer wait on the slowest procedure
in a batch.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 29, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7350aaad-b020-4029-9d5e-86cb2e77a4b2

📥 Commits

Reviewing files that changed from the base of the PR and between 71f8eed and 31abdfb.

📒 Files selected for processing (1)
  • apps/desktop/src/renderer/lib/host-service-client.ts

📝 Walkthrough

Walkthrough

Switches the tRPC transport layer in the host service client from httpBatchLink to httpLink, disabling request batching while maintaining the same endpoint, serialization, and authorization headers configuration.

Changes

Cohort / File(s) Summary
tRPC Transport Configuration
apps/desktop/src/renderer/lib/host-service-client.ts
Changed tRPC link from httpBatchLink to httpLink, removing request batching functionality while preserving all other client settings including superjson serialization and dynamic headers.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Poem

🐰 Batches bundled, now sent one by one,
No more waiting in the queue, off they run,
Each request flies swift on its own little wing,
Single and nimble, a speedier thing! ✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch trpc-batching-perf

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 5/8 reviews remaining, refill in 17 minutes and 40 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

@Kitenite Kitenite merged commit 52515a9 into main Apr 29, 2026
6 of 7 checks passed
@Kitenite Kitenite deleted the trpc-batching-perf branch April 29, 2026 23:18
@github-actions
Copy link
Copy Markdown
Contributor

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ⚠️ Neon database branch

Thank you for your contribution! 🎉

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.

1 participant