Documentation menu

Large-Repo Benchmarks

Graph-sitter's Rust backend is being validated against pinned large repositories before it becomes the default backend. The current benchmark evidence is for the rust-rewrite branch and branch-built wheels, not a final PyPI release.

Use these numbers as release evidence for the current implementation shape: Python remains the authoring shell, while Rust owns compact parse/index graph storage for the supported subset. Hardware, cache state, and package artifact shape can change absolute times.

Pinned Repositories

RepositoryRefCommitLanguage mode
Apache Airflow2.10.5b93c3db6b1641b0840bd15ac7d05bc58ff2cccbfPython
Next.jsv15.0.051bfe3c1863b191f4b039bc230e8ed5c57b0baf3TypeScript, JavaScript, React

Codebase Construction

These measurements use real Codebase(...) construction with CodebaseConfig(graph_backend="rust", rust_fallback="error"). In strict Rust mode, the old eager Python graph is blocked after the compact Rust index builds.

RepositoryPython wallPython max RSSRust wallRust max RSSWall improvementRSS improvement
Apache Airflow 2.10.518.940s3469.5 MB4.085s266.2 MB4.637x13.031x
Next.js v15.0.024.959s3100.1 MB10.771s435.2 MB2.317x7.123x

The Airflow row exercises compact Python files, symbols, imports, import resolution, references, dependencies, and Python compatibility handles. The Next.js row exercises TypeScript/JavaScript files, symbols, imports, exports, relative and tsconfig path resolution, JSX component tag references, dependencies, subclass edges, read-only function call records, and read-only Promise-chain records.

Installed-Wheel uvx Proof

Branch-built wheels are also tested through uvx --from dist/<wheel>.whl graph-sitter ..., which proves package contents and CLI entry points rather than relying on an editable checkout.

RepositoryBackendParse elapseduvx outer wallSampled RSSParse improvementRSS improvement
Apache Airflow 2.10.5Rust strict4.913s6.064s487.0 MB9.818x vs Python parse11.148x
Apache Airflow 2.10.5Python48.242s77.649s5429.3 MBbaselinebaseline
Next.js v15.0.0Rust strict10.352s11.508s537.5 MB5.598x vs Python parse8.383x
Next.js v15.0.0Python57.956s78.107s4505.6 MBbaselinebaseline

The installed-wheel Rust parse paths matched the committed compact golden summaries for both repositories.

Codemod Proof

The same branch-built wheel gates run real write-mode transforms on temporary clones:

RepositoryTransform proofValidation
Apache Airflow 2.10.5Adds from typing import Any and renames __getattr__ in airflow/__init__.pyOnly airflow/__init__.py changed
Next.js v15.0.0Adds an import, renames AppRouterAnnouncer, and updates its importing usageOnly app-router-announcer.tsx and app-router.tsx changed

These checks prove that the Rust-backed Python shell can run selected codemods without materializing the old Python graph.

Reproduce

Run the fast local gate:

rust-rewrite/tools/check_fast.sh

Run the opt-in large-repo gate:

rust-rewrite/tools/check_pinned_large_repos.sh

Run branch-built wheel proofs:

rust-rewrite/tools/check_wheel_rust_backend.sh
uv run python rust-rewrite/tools/check_wheel_pinned_python_repo.py --compare-python-backend --run-transform-proof
uv run python rust-rewrite/tools/check_wheel_pinned_typescript_repo.py --compare-python-backend --run-transform-proof

See uvx workflows for the user-facing CLI form.

Caveats

  • Rust is still opt-in. The Python backend remains the default until rollout gates, parity gates, and release artifact validation pass.
  • The installed-wheel results are branch-built wheel results. Published-package uvx graph-sitter ... claims require a separate clean-environment release transcript.
  • Counts are compared against compact Rust golden summaries, selected semantic parity checks, and codemod file-diff assertions. Full graph-wide semantic equality is still tracked separately before default-backend promotion.