Repository navigation
perf(agent): the laptop agent allocates a fraction per request and asks boxes at once - #47
Merged
Merged
Conversation
…and fan-out Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e log Past 200 requests a host's log was copied into a new slice on every request (about 64 KB and 8 us each for a page and its API host). It now grows to twice the limit and drops the old half in place. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
httputil.ReverseProxy and io.Copy between a socket and an HTTP/2 stream each made a fresh 32 KB buffer per request or connection. They now share a pool (internal/copybuf). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…xied request The proxy read and parsed routes.json first thing for each request it relayed (about 33 us on macOS). The routes are now kept until a stat shows the file changed, so edits from the CLI still apply at once (statefile.Cache). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… whole status Each request to a worktree name without a box built the agent's full status, which reads three files, just to list the boxes' names. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…turn The Kits view's installed list and team suggestions asked each online box one after another, so four boxes took four answers' time and one slow box held up the rest by up to its whole timeout. They now ask up to eight boxes at once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…settings read each Every request the app sends a box through the agent made a 32 KB copy buffer and read box-routes.json while syncing the boxes. The buffer now comes from the shared pool and the route settings are kept until the file changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
Part 1 of the overnight performance pass, split out of #46. This is the laptop agent's share, without the trust-store cache, which gets its own PR for review.
internal/copybuf) for proxied requests, port forwards, box streams and the app's box requests. Proxied GET 82 → 15.5 KB, forwarded connection 73 → 7.8 KB.routes.jsoncached until the file changes (statefile.Cache, keyed on dev, inode, size and ns times): 14.9 → 2.2 µs per lookup.worktree.location.localhosthosts resolve without building the agent's whole status: 65 → 38 µs and 84.6 → 13.8 KB per proxied GET.Benchmarks are in the repo (
bench_*_test.go). Details and charts: https://claude.ai/artifact/E9rDKdK8BnzazAzdGGBG4C (private until shared).Checks:
go vet,go test -raceon agent, proxy, forward, copybuf, statefile, wire and cmd. The full suite passed on the combined branch in #46.🤖 Generated with Claude Code