Graf and Graphify performance

The README chart compares Graf with Graphify on the complete Visual Studio Code repository. On this workload, Graf searched about 1000x faster and refreshed an unchanged graph about 89x faster.

Results

Full VS Code operationGrafGraphifyResult
Search, median of three terms0.013 s13.264 sGraf 1006x faster
No-op update0.88 s77.97 sGraf 88.6x faster
One-file comment update61.80 s75.91 sGraf 1.23x faster
Cold index260.10 s259.81 sEffectively tied
Cold peak memory5.46 GB7.92 GBGraf used 31% less

The three measured searches were URI, Workbench, and ExtensionHost:

SearchGrafGraphifySpeedup
URI29.7 ms13.264 s446x
Workbench13.2 ms14.000 s1062x
ExtensionHost10.9 ms12.919 s1190x

Graf reached cold-index parity while retaining a substantially richer graph:

OutputGrafGraphifyGraf / Graphify
Nodes563,959237,9862.37x
Edges1,559,361900,8321.73x
References retained by Graf2,538,660n/a

Method

  • Machine: Apple M1 Mac mini (Macmini9,1), 16 GB RAM, macOS 26.2.
  • Corpus: the full VS Code repository at bf715befd589605be045505d0456e4246054566f, containing 19,036 regular files.
  • Graf: 766c7e9f05cfabbac03d765fa35a38c34128e1fb.
  • Graphify: b9cd9570728a5ff3485d2a1e36fe9a1272a368ae (0.9.64).
  • Both tools used code-only mode with clustering disabled.
  • Each search term was warmed first. Graf used 20 measured samples per term; Graphify used five. The headline search number is the median result across the three terms.
  • No-op and one-file updates reused each tool's existing output and incremental cache.
  • Wall time covers process launch through exit. Peak memory is the child process's maximum resident set size.

The equivalent commands were:

graf --db STATE/index.db --json index . --code-only --no-semantic
python -m graphify extract . --out STATE/graphify-out --code-only --no-cluster --timing

graf --db STATE/index.db --json query TERM --depth 1 --limit 100
python -m graphify query TERM --graph STATE/graphify-out/graph.json

Tradeoffs

Graf stores a persistent indexed graph so later searches and updates do not reload and traverse a large JSON graph. That index uses more disk: Graf's SQLite database was 6.28 GB, while Graphify's unindexed graph JSON was 496 MB.

The headline numbers describe this repository, these versions, and this machine. Absolute times will vary across machines and codebases. The search comparison measures each product's normal query path; it does not claim that every possible query is exactly 1000x faster.