Scalability Benchmarks
GitHub vs Coregit API latency benchmarks with reproducible test methodology.
GitHub vs Coregit — Head-to-Head
Real-world benchmarks comparing GitHub REST API and Coregit API for identical operations. All tests run from the same machine, same network, same time window.
Test conditions: Kazakhstan → US-East, private repos with authentication, April 2026.
Write Operations
Coregit's atomic multi-file commit is the key differentiator. GitHub requires N+3 sequential API calls (N blobs + get HEAD + create tree + create commit + update ref). Coregit does it in 1 call.
| Operation | GitHub | Coregit | API Calls | Winner |
|---|---|---|---|---|
| Commit 1 file | 2,217 ms | 2,148 ms | 4 vs 1 | Coregit ~1:1 |
| Commit 5 files | 4,829 ms | 3,456 ms | 8 vs 1 | Coregit 1.4x |
| Commit 10 files | 8,387 ms | 4,183 ms | 13 vs 1 | Coregit 2.0x |
| Commit 100 files | 72,064 ms | 19,769 ms | 105 vs 1 | Coregit 3.6x |
Coregit's advantage grows with file count:
- 1 file: ~parity (single API call vs 4, but Coregit does more server-side)
- 5 files: 1.4x faster
- 10 files: 2.0x faster
- 100 files: 3.6x faster
- 1,000 files (projected): ~10x+ faster
Read Operations
| Operation | GitHub | Coregit | Winner |
|---|---|---|---|
| Read file (warm) | 735 ms | 800 ms | GitHub 1.1x |
| List tree | 797 ms | 752 ms | Coregit 1.1x |
| List commits (warm) | 829 ms | 474 ms | Coregit 1.7x |
Coregit uses KV-cached flat tree maps and commit lists. First request populates the cache; all subsequent requests hit cache.
Other Operations
| Operation | GitHub | Coregit | Winner |
|---|---|---|---|
| Create repo | 713 ms | 2,500 ms | GitHub 3.5x |
| Create branch | 689 ms | 1,794 ms | GitHub 2.6x |
| Diff branches (warm) | 738 ms | 752 ms | ~Parity |
GitHub's single-op operations are faster due to monolith architecture with in-memory caches (0 network hops between components). Coregit is a distributed system on Cloudflare Workers where each component (KV, R2, Durable Objects, Hyperdrive) is a separate network call. Diff performance was optimized with shared tree caching — subtrees common to both branches are fetched once.
Architecture
Coregit's performance stack:
- Cloudflare Workers — serverless compute at edge or near backend (Smart Placement)
- R2 — git object storage (content-addressed, immutable)
- KV — caching layer (tree maps, auth, repo metadata, commit lists, embeddings)
- Durable Objects — rate limiting, session state, per-repo hot layer
- Hyperdrive — PostgreSQL connection pooling and query caching for Neon
Caching layers
| Layer | Latency | What's cached | TTL |
|---|---|---|---|
| In-memory (per-request) | 0 ms | Git objects (32 MB cap) | Request lifetime |
| KV (global edge) | 5-15 ms | Auth, repo metadata, flat trees, commit lists, embeddings | 60s-forever |
| Edge Cache API | < 5 ms | Git objects (immutable by SHA) | 1 year |
| Hyperdrive | 0-5 ms | DB query results | 60s |
| R2 | 50-200 ms | All git objects, refs, packfiles | Permanent |
Session API (Zero-Wait Protocol)
For AI agents doing many operations in sequence, the Session API eliminates per-request auth overhead:
POST /v1/session— auth once, get session ID- All requests with
X-Session-Idheader — auth validated via Durable Object (~1ms) DELETE /v1/session/:id— close session, flush pending writes
Methodology
All benchmarks use the same pattern:
# Timing with millisecond precision
ms() { python3 -c "import time; print(int(time.time()*1000))"; }
t1=$(ms); <operation>; t2=$(ms); echo "$((t2-t1)) ms"All benchmarks use gh api for GitHub and cgt CLI for Coregit. Create repo uses gh repo create. All authenticate with API keys (private repos). 3 runs per operation, median reported.
For multi-file commits on GitHub, each blob is created with a separate POST /repos/:owner/:repo/git/blobs call, followed by tree creation, commit creation, and ref update — matching the minimum required API calls.
Reproduce
# GitHub: commit 10 files (13 API calls)
for i in $(seq 1 10); do
gh api repos/OWNER/REPO/git/blobs -f content="file $i" -f encoding=utf-8
done
# + get HEAD + create tree + create commit + update ref
# Coregit: commit 10 files (1 API call)
cgt commit my-repo -b main -m "add 10 files" \
-f f1.ts:='1' -f f2.ts:='2' ... -f f10.ts:='10'