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 → CF edge / US-East, private repos with authentication, April 2026. 10 iterations + 2 warmup per operation, median (p50) reported.
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 | 610 ms | 1,195 ms | 1¹ vs 1 | GitHub 2.0x |
| Commit 5 files | 4,829 ms | 2,542 ms | 8 vs 1 | Coregit 1.9x |
| 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 |
PUT /contents/:path) — a simplified 1-call endpoint. Multi-file commits require the full Git Data API (N+3 calls).
Coregit's advantage grows with file count because GitHub's per-blob API calls accumulate linearly:
- 1 file: GitHub faster (Contents API shortcut, less server-side work)
- 5 files: Coregit 1.9x faster
- 10 files: Coregit 2.0x faster
- 100 files: Coregit 3.6x faster
- 1,000 files (projected): ~10x+ faster
Read Operations
| Operation | GitHub | Coregit | Winner |
|---|---|---|---|
| Get repo info | 426 ms | 219 ms | Coregit 1.9x |
| Read file | 411 ms | 487 ms | GitHub 1.2x |
| List tree | 1,290 ms | 535 ms | Coregit 2.4x |
| List commits (20) | 397 ms | 240 ms | Coregit 1.7x |
Coregit uses edge-cached flat tree maps and commit lists. First request populates the cache; all subsequent requests hit cache. Tree listing is 2.4x faster because Coregit resolves it in 1 call — GitHub needs 3 (ref → commit → tree).
Other Operations
| Operation | GitHub | Coregit | Winner |
|---|---|---|---|
| Create branch | 832 ms | 1,562 ms | GitHub 1.9x |
| List branches | 420 ms | 758 ms | GitHub 1.8x |
| Diff branches (warm) | — | 544 ms | — |
| Compare (warm) | — | 644 ms | — |
GitHub's single-op write operations are faster due to monolith architecture with in-memory caches (0 network hops between components). Coregit is a distributed system on serverless edge compute where each component (edge cache, object storage, coordination layer, connection pooler) is a separate network call.
Architecture
Coregit's performance stack:
- Serverless edge compute — serverless compute at edge or near backend (Smart Placement)
- Object storage — git object storage (content-addressed, immutable)
- Edge cache — caching layer (tree maps, auth, repo metadata, commit lists, embeddings)
- Coordination layer — rate limiting, session state, per-repo hot layer
- Connection pooler — PostgreSQL connection pooling and query caching
Caching layers
| Layer | Latency | What's cached | TTL |
|---|---|---|---|
| In-memory (per-request) | 0 ms | Git objects (32 MB cap) | Request lifetime |
| Edge cache (global) | 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 |
| Connection pooler | 0-5 ms | DB query results | 60s |
| Object storage | 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 coordination layer (~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'