Dev rewrites opencode server in Rust: 100MB vs 2.4GB RAM, session search 30,000x faster
microbass · reddit · 2026-10-20
An opencode power user got tired of the server: 2.4GB RSS, a 33GB SQLite file, and 6-second in-session searches on a laptop. So they rewrote it in Rust as ocserve, keeping the HTTP/SSE wire contract fully compatible — the official TUI and web UI attach unmodified.
Back-to-back on the same box and fixture data (vs upstream):
- Binary 61MB vs 185MB; idle RSS 100MB vs 2.4GB
- Boot 0.6s vs 4.7s; session read p95 0–2ms vs 8–15ms
- In-session search 0.2ms vs 6s; web UI first load 1.05MB vs 9.10MB of assets
- Read-only load test (2 cores, no model calls): 6,700 req/s vs 420, p95 latency an order of magnitude lower
Supports both v1 and v2 API shapes: TUI attach, streaming, tools, permissions, PTY, shadow-git snapshots, revert, diff, in-session search, MCP, plugins. Missing: provider OAuth, hosted share backend, macOS/Windows (PTY is Linux/glibc only). Independent MIT codebase with a differential harness byte-comparing both servers.
More from coding & agent
- Ethan Mollick: new Claude Projects shines as a coordinator-plus-agents interface for multi-agent work — emollick · 2026-10-20
- Yacine: After AI I commit less code but write far more words — yacineMTB · 2026-10-20
- Google engineer releases a Skill that turns any code diff into an interactive visual explainer for PR review — ykdojo · 2026-10-20
- From hand-coding to "approve once": human sign-off is the new bottleneck — ThePeterMick · 2026-10-20
- asc CLI changelog: user-input failures no longer counted as App Store Connect tool bugs — rudrank · 2026-10-20
- App Store Connect CLI 5.16.0 ships named uploads, safer sign-ins and longer video timeouts — rudrank · 2026-10-20