Coregit
Guides

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.

OperationGitHubCoregitAPI CallsWinner
Commit 1 file610 ms1,195 ms1¹ vs 1GitHub 2.0x
Commit 5 files4,829 ms2,542 ms8 vs 1Coregit 1.9x
Commit 10 files8,387 ms4,183 ms13 vs 1Coregit 2.0x
Commit 100 files72,064 ms19,769 ms105 vs 1Coregit 3.6x
¹ GitHub single-file commit uses the Contents API (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

OperationGitHubCoregitWinner
Get repo info426 ms219 msCoregit 1.9x
Read file411 ms487 msGitHub 1.2x
List tree1,290 ms535 msCoregit 2.4x
List commits (20)397 ms240 msCoregit 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

OperationGitHubCoregitWinner
Create branch832 ms1,562 msGitHub 1.9x
List branches420 ms758 msGitHub 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

LayerLatencyWhat's cachedTTL
In-memory (per-request)0 msGit objects (32 MB cap)Request lifetime
Edge cache (global)5-15 msAuth, repo metadata, flat trees, commit lists, embeddings60s-forever
Edge Cache API< 5 msGit objects (immutable by SHA)1 year
Connection pooler0-5 msDB query results60s
Object storage50-200 msAll git objects, refs, packfilesPermanent

Session API (Zero-Wait Protocol)

For AI agents doing many operations in sequence, the Session API eliminates per-request auth overhead:

  1. POST /v1/session — auth once, get session ID
  2. All requests with X-Session-Id header — auth validated via coordination layer (~1ms)
  3. 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'

On this page