Gortex vs Graphify: Code Exploration Token Benchmark
Benchmark of Gortex v0.64.12 vs Graphify v0.9.124 on a 726-file Next.js repo: 74.4%–97.9% token cuts, CLI latency, disk/RAM footprints, and setup fixes.

Most token spend in AI coding sessions does not come from writing code—it comes from code archaeology (running grep and reading five to ten whole files just to trace one call chain). Two open-source local code-graph engines tackle this problem from very different angles: Gortex (zzet/gortex), a persistent Go daemon with Tree-sitter + SQLite FTS5, and Graphify (Graphify-Labs/graphify), a Python AST knowledge-graph generator with deterministic JSON/HTML/Markdown artifacts.
Unlike prompt/output compression covered in our Caveman & Ponytail token-saver guide or MCP schema trimming in our Claude Code Code Mode & Background MCP guide, Gortex and Graphify reduce tokens at the repository read layer. We installed both tools locally and benchmarked them head-to-head on a clean copy of our 726-file production Next.js repository (hafuture-app).
Quick Verdict
| Dimension | Gortex (v0.64.12) | Graphify (v0.9.124, --code-only) |
|---|---|---|
| Architecture & Footprint | 313 MB static Go binary + persistent Unix-socket daemon (126.2 MiB RAM) + 96 MB SQLite FTS5 store | 193 MB Python 3.14 venv (59 packages) + 4.6 MB static graphify-out/, 0 MB idle RAM |
| 4-Task Total Tokens & Latency | 11,246 tokens (-74.4%, 3.9×) · 125.1 ms median (GCX1 payload includes full symbol source code) | query: 9,083 tokens (-79.3%, 4.8×) · 269.7 ms / explain & affected: 906 tokens (-97.9%, 48.4×) · 256.1 ms (graph edges & line anchors only) |
| Best Fit | Daily multi-repo IDE/MCP work where returning runnable symbol source + blast callers in one round-trip avoids follow-up file reads | Low-footprint, zero-daemon repos, CI pipelines, pinpoint caller lookups (affected), and mixed code + Markdown/PDF knowledge graphs |
The headline trade-off is what you get per call. Gortex's explore -f gcx ships the actual function source slices and blast-radius callers in a single 125 ms round-trip so the agent can edit immediately. Graphify's explain and affected return ultra-compact 118–376 token relationship maps with exact file:line anchors, letting the agent read only the exact 30-line window it needs.
Test Methodology & Environment
To prevent cross-contamination (such as Gortex indexing Graphify's graphify-out/ artifacts), we created two isolated git clones of /home/hafuture/Projects/hafuture-app at commit 9f4ab12 (726 tracked files: 201 files in src/, 161 Markdown/MDX files in content/, 26 MB working tree) and ran Gortex inside an isolated XDG_* runtime directory.
- Host Environment: Linux
7.2.15-4-omarchy(x86_64), 16 vCPUs, 30 GiB RAM - Exact Tool Versions:
gortex v0.64.12+824fbf792(Go 1.27.3,linux/amd64),graphifyy==0.9.124+mcp==2.3.0(CPython3.14.8,uv 0.13.11) - Tokenizer: Exact
cl100k_basetoken counts viatiktoken==0.14.0across full stdout payloads - Latency Protocol: Median wall-clock time across 3 consecutive runs per command
- Baseline Control: Full-file reads of every TypeScript/TSX file matched by
git grep -lfor each task. In Task 1, we explicitly excluded five noisy i18n JSON files (src/messages/*.json, 147,892 tokens) from the main baseline (using the 5 clean TS/TSX files = 9,753 tokens) so reduction multiples reflect realistic developer queries rather than accidental JSON dumps.
Reproducible Setup & Indexing Commands
# 1. Install official static binary (or curl -fsSL https://get.gortex.dev | sh)
curl -fsSL https://github.com/zzet/gortex/releases/download/v0.64.12/gortex_linux_amd64.tar.gz -o gortex.tar.gz
tar -xzf gortex.tar.gz -C ~/.local/bin
# 2. Start background daemon (--detach is required in non-interactive shells)
gortex daemon start --detach
# 3. Track repository and wait for index settlement (--loading-wait avoids exit 75)
gortex --loading-wait 30s track /path/to/repo --wait
# 4. Run codebase digest and GCX1 task exploration
gortex --loading-wait 30s wakeup
gortex --loading-wait 30s explore "resolveOgImage WebP fallback" -f gcx -n 5Quantitative Comparison
1. Indexing Speed, Disk Size & Memory Footprint
| Metric | Gortex (v0.64.12) | Graphify (v0.9.124, --code-only) | Graphify (update ., incl. Markdown) |
|---|---|---|---|
| Install Footprint | 313 MB (1 static binary) | 193 MB (Python venv, 59 packages) | Same (193 MB) |
| Indexed Files | 692 (code, Markdown, JSON, configs) | 249 (code only; 437 docs/images skipped) | 576 (code + Markdown headings) |
| Graph Size | 14,754 nodes · 34,707 edges (5,379 FTS5 docs) | 1,438 nodes · 3,875 edges · 92 communities | 6,514 nodes · 8,688 edges · 445 communities |
| Cold Index Time | 4,877 ms (track --wait; graph settled in 1.0s) | 7,707 ms (--code-only 7,009 ms + cluster-only 698 ms) | 5,500 ms (10 parallel workers) |
| Incremental Update (1-line TS edit) | Live daemon file watcher | graphify update . 1,549 ms (no-op if topology unchanged) | Same (AST cache) |
| On-Disk Index Size | 96 MB (store.sqlite 81.5 MiB + WAL 13.0 MiB) | 4.6 MB (graph.json 1.6 MB + graph.html 1.6 MB) | 5.8 MB (graph.json 5.3 MB) |
| Idle Memory (RAM) | 126.2 MiB alloc (heap_inuse 172.6 MiB) | 0 MB (stateless CLI; resident only when MCP runs) | 0 MB |
| Initial Orientation Digest | wakeup: 269 tokens (880 B · 155.6 ms) | GRAPH_REPORT.md: 5,673 tokens (19.3 KB) | GRAPH_REPORT.md: 138 KB (~30k+ tokens) |
Two empirical realities jump out immediately. First, "single static binary" does not mean tiny: bundling 257 Tree-sitter grammars and in-process resolvers makes Gortex 313 MB on disk, plus 96 MB for its SQLite FTS5 graph store. Second, for session orientation, Gortex's wakeup digest (269 tokens) is 21.1× smaller than Graphify's code-only GRAPH_REPORT.md (5,673 tokens).
2. Per-Task Token Consumption & CLI Latency
We ran four realistic maintenance questions against both graphs:
- T1 (OG Image Fallback): Trace how
resolveOgImagemaps WebP cover images to social-crawler PNG/JPEG files and find its callers (5 TS/TSX files). - T2 (Thin-Post Noindex & Sitemap): Trace how
THIN_NOINDEX_SLUGSexcludes legacy thin posts fromsitemap.tsand blog pages (6 files). - T3 (MDX Registry & Detection): Inspect how
getPostBySlugdetects MDX vs Markdown and which custom components are registered (3 files). - T4 (
getPostsBlast Radius): Map all routes, pagination views, and sitemap consumers callinggetPosts(8 files).

| Task | Clean Baseline (Full Files) | Gortex explore -f gcx (w/ Source) | Gortex explore -f json | Graphify query (BFS Graph) | Graphify explain / affected |
|---|---|---|---|---|---|
| T1: OG Image Fallback | 9,753 tokens (5 files)* | 993 tokens (-89.8% · 120.7 ms) | 1,249 tokens (121.3 ms) | 1,675 tokens (-82.8% · 260.6 ms) | 138 tokens (-98.6% · 254.3 ms) |
| T2: Noindex & Sitemap | 13,612 tokens (6 files) | 5,720 tokens (-58.0% · 145.4 ms) | 6,616 tokens (143.8 ms) | 1,831 tokens (-86.5% · 265.0 ms) | 118 tokens (-99.1% · 257.9 ms) |
| T3: MDX Detection | 7,904 tokens (3 files) | 1,612 tokens (-79.6% · 110.7 ms) | 1,909 tokens (115.8 ms) | 1,861 tokens (-76.5% · 275.7 ms) | 274 tokens (-96.5% · 253.9 ms) |
T4: getPosts Blast Radius | 12,592 tokens (8 files) | 2,921 tokens (-76.8% · 129.4 ms) | 3,423 tokens (133.3 ms) | 3,716 tokens (-70.5% · 274.4 ms) | 376 tokens (-97.0% · 262.1 ms) |
| 4-Task Total / Median Latency | 43,861 tokens | 11,246 tokens (-74.4% · 125.1 ms) | 13,197 tokens (-69.9% · 127.3 ms) | 9,083 tokens (-79.3% · 269.7 ms) | 906 tokens (-97.9% · 256.1 ms) |
* Including the five i18n JSON files matched by an unfiltered grep in T1 raises the raw baseline to 157,645 tokens (a 158.8× drop for Gortex GCX), but we report the clean TS/TSX baseline (9,753 tokens) to avoid inflated comparisons.
3. Reading Behind the Numbers
- Why Gortex used 5,720 tokens on T2—and why that is useful: Gortex's
smart_contextreturned the complete source bodies ofBlogPostPage,getPosts,getPostBySlug,getPageUrl, andTHIN_NOINDEX_SLUGS, plus 19blast_callersand ano_covering_tests=trueflag in 145.4 ms. Meanwhile, Gortex's TSV-like GCX1 wire format cut 14.8% off its own JSON output (13,197 → 11,246 tokens) across the four tasks. - Graphify's two-tier exploration vs BFS truncation: On T1–T3,
graphify queryhit its ~2,000-token BFS budget and emitted[!] TRUNCATED: showing 58 of 212 nodes. Once you know a symbol name, however,graphify explainandgraphify affectedreturn pinpoint[EXTRACTED]call edges and line numbers (e.g.,BlogPage() [calls] src/app/[locale]/blog/page.tsx:L34) in 118–376 tokens, so a targeted 40-line follow-up read still stays dramatically cheaper than full-file reads. - CLI round-trip speed (2.1× faster on Gortex): Gortex's resident Go daemon answers CLI calls in 110.7–145.4 ms over a Unix socket. Graphify spawns Python and loads the 1.6 MB
graph.jsonper CLI invocation (253.9–275.7 ms), though running its persistent MCP server (python -m graphify.serve) eliminates that startup overhead.
Real-World Troubleshooting & Gotchas
Every issue below occurred live during our benchmark setup—and will trip up CI pipelines or coding agents if left unhandled.
1. Gortex: Non-TTY repo_loading race condition (exit code 75)
Immediately after gortex daemon start --detach printed daemon ready (50ms boot), running gortex track or gortex daemon status from a non-interactive script failed:
Error: status rejected: repo_loading store is opening or migrating; retry
Error: the gortex daemon is still resolving graph admission (repo_loading, identity_pending) (identity_resolution) — graph admission for this path is not yet established; retry shortly (or pass --loading-wait to wait for it)
- Root Cause:
--loading-waitdefaults to30son an interactive TTY, but silently drops to0when stdout is non-TTY (failing fast with exit 75 while SQLite opens). Runninggortex daemon startwithout--detachalso blocks the shell in the foreground. - Fix: Always start scripted daemons with
gortex daemon start --detachand pass--loading-wait 30son subsequent non-TTY CLI calls.
2. Gortex: Bare symbol names fail gortex trace with src_not_found
Running gortex trace getPosts resolveOgImage returned:
No call path from getPosts to resolveOgImage.
Reason: src_not_found
getPosts is not in the graph
- Root Cause:
gortex tracerequires fully qualified graph node IDs (<repo>/<path>::<symbol>) rather than short function names. - Fix: Pass qualified IDs from
gortex explore—e.g.,gortex trace "bench-gortex/src/lib/posts.ts::getPosts" "bench-gortex/src/lib/posts.ts::resolveOgImage"—which immediately returns--calls(ast)-->.
3. Graphify: graphify . aborts on mixed code + Markdown repos without an API key
Running graphify . in our Next.js repo failed immediately:
error: no LLM API key found (437 doc/paper/image file(s) need semantic extraction).
Set GEMINI_API_KEY or GOOGLE_API_KEY (gemini), ... Or pass --code-only to index just the code (local AST, no key) and skip the non-code files.
- Root Cause: Any Markdown, PDF, or image file triggers semantic LLM extraction by default.
- Fix: Use
graphify . --code-onlyfor zero-API-key deterministic AST indexing.
4. Graphify: cluster-only silently falls back to claude -p
Following the post-extract hint to run graphify cluster-only . produced:
[graphify label] no API key found; naming communities via the `claude` CLI (claude -p).
Set an API key or pass --backend to choose explicitly, or GRAPHIFY_BACKEND=none to disable.
- Root Cause: When no API key is configured but the
claudeCLI is on$PATH, Graphify invokesclaude -pto label communities—which can burn Claude Code quota or hang headless jobs. - Fix: Prefix deterministic runs with
GRAPHIFY_BACKEND=none(GRAPHIFY_BACKEND=none graphify cluster-only .).
5. Graphify: graphify update . inflates GRAPH_REPORT.md to 138 KB on content-heavy repos
Running graphify update . at the repo root indexed Markdown headings across content/posts/, ballooning the graph from 1,438 nodes to 6,514 nodes, tripping the 5,000-node graph.html cap (falling back to an aggregated community view), and expanding GRAPH_REPORT.md from 19 KB (5,673 tokens) to 138 KB (~30k+ tokens).
- Fix: Exclude prose/content directories via
.graphifyignoreor scope updates directly tographify update src/.
Which One Fits Your Workflow?
- Tracing cross-service calls and blast radius across multi-repo workspacesSpeed & Precision· Daily Coding & Refactoring
257 languages, native multi-repo contract tracking, live file watching, and one-shot GCX1 source payloads minimize agent round-trips.
Primary Pick:Gortex (MCP + Daemon)Alternative:Graphify merge-graphs - Zero idle RAM on constrained laptops or containers with git-hook refreshesLow Footprint· Lightweight, CI & Mixed Docs
A 4.6 MB static JSON artifact plus a post-commit hook keeps graphs fresh with zero background daemon memory.
Primary Pick:Graphify (--code-only + hook)Alternative:Gortex on-demand - Checking callers of a core function (e.g., getPosts) under 400 tokensUltra-Low Tokens· Daily Coding & Refactoring
Returns exact caller lines and EXTRACTED confidence tags in 118–376 tokens so agents read only the lines that matter.
Primary Pick:Graphify affected / explainAlternative:Gortex node --callers - Linking code symbols with design docs, PDFs, SQL schemas, and diagramsMultimodal Graph· Lightweight, CI & Mixed Docs
Combines AST edges with semantic concept nodes and generates an agent-crawlable Markdown --wiki.
Primary Pick:Graphify (LLM Semantic Mode)Alternative:Gortex + external RAG - Deterministic, zero-LLM-cost execution in GitHub Actions or headless agentsCI Determinism· Lightweight, CI & Mixed Docs
One environment variable disables all LLM fallbacks in Graphify; Gortex works in CI too if you explicitly pass --loading-wait.
Primary Pick:Graphify (GRAPHIFY_BACKEND=none)Alternative:Gortex (--loading-wait 30s) - Minimizing end-to-end API costs across exploration, MCP schemas, and repliesTotal Cost· Full-Stack Token Savings
Graph tools cut code-reading input tokens by 74%–98%, while output/log compression and Code Mode MCP reduce the remaining overhead.
Primary Pick:Gortex/Graphify + CavemanAlternative:Add Code Mode MCP
Limitations & Recommendation
This benchmark evaluated a single 726-file TypeScript/Next.js repository via CLI payloads and wall-clock latency. Behavior on 10,000+ file monorepos, LLM-assisted Graphify extraction over PDFs/images, and fixed prompt-token overhead from exposing many MCP tool schemas (Gortex offers up to 175 configurable MCP tools; trim your enabled surface) will vary by workload.
If your repository has fewer than ~20 files, skip both tools—direct file reads cost only a few thousand tokens and avoid maintaining any index or MCP schema overhead.
For medium-to-large repositories, the split is straightforward:
- Choose Gortex if you develop daily on a 16 GB+ workstation across one or multiple repositories and want 125 ms responses with runnable code slices and blast-radius callers in a single call—just remember
--detachand--loading-wait 30sin scripts. - Choose Graphify if you want a 4.6 MB static index, 0 MB idle RAM, transparent
EXTRACTED/INFERREDedge provenance, or unified code + documentation graphs—and lock down--code-only,GRAPHIFY_BACKEND=none, and.graphifyignorewhen running zero-cost local code graphs.
Official References
Related Articles
Claude Code 'Code Mode' & Background MCP Tasks Guide: Cut Tool Round-Trips and Token Waste
Learn how to enable Claude Code Code Mode (v2.1.323+) JS batch tool execution and Background MCP Tasks & Elicitations (v2.1.304+), with safe hook guardrails.
Google Workspace MCP Server & gwscli GA Guide
Practical guide to Google Workspace MCP servers & gwscli (GA Nov 24, 2026): Streamable HTTP setup, free Standard Tier (5,000/day), and Feb 1, 2027 rules.
Claudia Guide: Manage Claude Code Settings & MCP in a GUI
Set up Claudia (v0.2.0), the MIT-licensed Go tray app for Claude Code. Manage 180 settings.json keys, CLAUDE.md, auto memory, MCP servers, and skills per project.