Hey everyone and Google DevRel team,
Like many Windows developers running Antigravity 2.4, I’ve noticed significant turnaround latency during agent execution. While model inference is one part of it, I decided to do a deep-dive performance audit of the local harness and runtime (language_server.exe v2.33.0/2.34.0) to see what is actually happening under the hood.
Here are the concrete benchmarks and architectural bottlenecks identified:
1. The PowerShell Cold-Start Penalty (1.2s per command)
run_command executes every command in an isolated, ephemeral PowerShell session. We benchmarked process spawning on a modern Windows 11 NVMe setup:
cmd.exe /c exit: 17.3 mspowershell.exe -NoProfile -Command exit: 290.2 ms- Harness-wrapped
powershell.exeexecution: ~1,200 ms
When the agent executes a multi-step task (e.g. checking git status, inspecting files, running tests across 5 steps), over 6 seconds are wasted solely waiting for PowerShell to boot and exit. Using a persistent Windows ConPTY terminal daemon would reduce this overhead to <1 ms.
2. Massive System Prompt Bloat on Turn 1 (19,169 Tokens)
Inspecting transcript.jsonl revealed that on Turn 1, the harness transmitted 19,169 input tokens with cache_read_tokens: 0 before any user query was processed.
The harness is statically dumping all 43 installed plugin skills, 19 tool schemas, and multi-page subagent system prompts into the root context. This leads to high TTFT (Time-To-First-Token) and frequent KV-cache invalidation.
3. Network Handshake RTT to Gemini Endpoints
Measuring raw socket handshakes to generativelanguage.googleapis.com:443:
- TCP Connect: 498.2 ms
- TLS Handshake: 237.3 ms
- Total Handshake: 735.5 ms
Because the agent loop is strictly sequential (stop-and-wait after every single tool call), cumulative message histories are uploaded over this link repeatedly without HTTP/2 multiplexed streaming to local edge nodes.
4. Background Loops in Electron
Checking main.log in AppData revealed:
- Continuous unhandled exceptions from
wsl:get-stateshelling out towsl.exe --list --verbose. - Hourly downloads of the full 100MB+ installer executable.
- The Electron renderer process accumulated 14,350 CPU seconds, pointing to unvirtualized DOM rendering of long markdown streams.
Suggested Architectural Fixes for the Antigravity Team
- Persistent ConPTY Terminal: Replace ephemeral
powershell.exespawns with a long-running pseudo-terminal daemon (like VS Code or Cursor). - Just-In-Time (JIT) Skill Resolution: Inject skill manifests on-demand when user intent requires them, rather than loading 43 skills statically.
- Persistent HTTP/2 / gRPC Stream: Maintain a persistent connection to the nearest Google Cloud Anycast edge to avoid repeated WAN handshakes.
- Tool Pipelining: Allow client-side batching of read-only tools (
read_file,list_dir) in a single round trip.
Has anyone else on Windows profiled similar bottlenecks? Happy to share reproduction scripts and logs with the engineering team.