Optimize VM performance with parallel checks and batch operations#27
Open
alexander-acker wants to merge 1 commit intoOpenCoworkAI:mainfrom
Open
Optimize VM performance with parallel checks and batch operations#27alexander-acker wants to merge 1 commit intoOpenCoworkAI:mainfrom
alexander-acker wants to merge 1 commit intoOpenCoworkAI:mainfrom
Conversation
…ance - Run Node.js, Python, and claude-code checks in parallel via Promise.allSettled (saves ~20-30s on status detection by eliminating sequential SSH calls) - Combine Python and pip checks into single shell invocation - Use exponential backoff (100ms->2s) for agent startup polling instead of fixed 500ms/1s delays, reducing startup latency by ~800ms on fast systems - Add batch command support to Lima/WSL agents for multi-operation IPC - Use rsync -rlptD instead of -a to skip owner/group resolution (faster cross-filesystem sync) - Combine file count + size into single shell command after sync - Avoid redundant full status re-check after Lima instance start https://claude.ai/code/session_01VXvXaDFPiDEJQy4b8FU7so
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
This PR implements several performance optimizations for VM management across Lima and WSL sandboxes, focusing on reducing startup time and improving responsiveness through parallelization and batching.
Key Changes
Parallel Dependency Checks
Promise.allSettled()for parallel execution of Node.js, Python, and claude-code availability checksAgent Startup Optimization
Batch Operation Support
sendBatchRequest()method: Added to both LimaBridge and WSLBridge for executing multiple independent operations in a single IPC round-tripSync Optimizations
-avto-rlptD(skips owner/group preservation) for cross-filesystem syncs in both LimaSync and SandboxSyncfindandducommands into a single shell invocation to get file count and total sizeBootstrap Optimization
limactl listand SSH connection checks when instance state is already knownTesting
Added comprehensive test suite (
vm-performance.test.ts) verifying:Promise.allSettledhttps://claude.ai/code/session_01VXvXaDFPiDEJQy4b8FU7so