Inspecting 50,000-file Delta Lake tables in 111ms and 89MB RAM without a JVM

DeltaLens is a standalone 13.8 MB read-only Rust CLI and library that reads only _delta_log/ metadata across local disks, AWS S3, Google Cloud Storage, and Azure ADLS.

Head-to-head benchmarks (cold and warm)

All numbers below were measured on Linux x86_64 (AMD Ryzen 5 5600H, 12 logical CPUs) comparing deltalens 2.0.1 against deltalake 1.7.0 (delta-rs Python 3.12.16). To avoid measuring only Python startup overhead, the script records both cold CLI subprocesses and warm in-process Python calls.

Interactive view (measured on identical Delta tables)

deltalens 2.0.1 (cold CLI)111.01 ms
deltalake 1.7.0 (warm in-process)285.46 ms
deltalake 1.7.0 (cold CLI)397.34 ms

Lower is better. Peak RSS measured in an isolated child process so parent Arrow allocations never skew the reading.

Workload deltalens (cold) deltalake (cold) deltalake (warm) Peak RSS
Real 60-commit table (Parquet checkpoints, schema evolution, DELETE) inspect 2.91 ms 56.50 ms 3.74 ms 12.5 MB vs 160.9 MB
Real 60-commit table lineage --last 20 vs history(20) 2.34 ms 61.04 ms 4.45 ms 12.6 MB vs 221.6 MB
Real 60-commit table diff --v1 0 --v2 60 2.60 ms n/a n/a 12.4 MB
100 commits / 1,000 files (full replay, no checkpoint) 4.24 ms 90.72 ms 16.81 ms 12.7 MB vs 398.4 MB
1,000 commits / 50,000 files (full replay, no checkpoint) 111.01 ms 397.34 ms 285.46 ms 89.4 MB vs 2,048.9 MB

Reproduce locally with zero permanent Python installs:

git clone https://github.com/sandy-sachin7/deltalens.git
cd deltalens
cargo build --release --locked
uv run --with deltalake --with pyarrow python3 scripts/bench_compare.py

Architecture notes

1. Offset listing from _last_checkpoint on cloud stores

Listing _delta_log/ on an S3 table with tens of thousands of commits burns dozens of paginated ListObjectsV2 calls before parsing starts. For snapshot and diff queries, DeltaLens reads _delta_log/_last_checkpoint first and calls object_store::ObjectStore::list_with_offset starting at {V:020}, falling back automatically to a cached full listing when inspecting pre-checkpoint history or stale hints.

2. Separate I/O and CPU concurrency (zero nested Tokio runtimes)

Cloud object fetches run through a shared process-wide Tokio runtime using futures::stream::buffer_unordered(32). Once raw bytes are in memory, NDJSON commit and Arrow Parquet checkpoint parsing fans out across Rayon worker threads. Rayon workers never enter rt.block_on(...).

3. Unified Remove-before-Add state machine

Operations such as RESTORE and Deletion Vector updates emit both a remove and an add for the same physical file in one commit. DeltaLens keys active files by (percent_decoded_path, deletion_vector_unique_id) and executes Phase 1 (Remove) before Phase 2 (Add) inside every commit while computing exact reclaimable tombstone bytes from delta.deletedFileRetentionDuration.

4. Read-only contract and TOCTOU-free containment

StorageBackend exposes no write, delete, or rename methods. On Linux and macOS, LocalStorage pins the table root with O_DIRECTORY | O_CLOEXEC and traverses relative path components with openat(..., O_NOFOLLOW). V2 checkpoint _sidecars/ paths and cloud keys reject traversal segments and prefix escapes.

Five-line GitHub Actions CI gate

Breaking schema changes (removals, Column Mapping renames, narrowing type conversions, tightened nullability) exit with code 2 and append a Markdown report to $GITHUB_STEP_SUMMARY.

- uses: sandy-sachin7/deltalens@main
  with:
    command: diff
    path: s3://my-bucket/warehouse/transactions
    args: --v1 ${{ env.PREV_VER }} --v2 ${{ env.CURR_VER }} --fail-on-breaking

Install DeltaLens

cargo install deltalens
# Or SHA-256 verified binary (Linux / macOS):
curl -fsSL https://raw.githubusercontent.com/sandy-sachin7/deltalens/main/scripts/install.sh | bash

Open contributor issues (shell completions, Prometheus export, data-skipping stats analysis): github.com/sandy-sachin7/deltalens/issues