Repository navigation
Description
Problem
Benchmarking #55 against the published 0.2.0 wheel showed that most queries got faster or stayed level, but two got slower by more than run-to-run noise:
| Query | Mode | 0.2.0 | #55 | Change |
|---|---|---|---|---|
| 30-query suite Q30 | in memory | 41.7 ms | 45.9 ms | +10% |
| 30-query suite Q30 | lazy | 41.2 ms | 46.9 ms | +14% |
| IC6 (GDC Interactive) | in memory | 22.5 ms | 25.8 ms | +14% |
These are medians of medians from a focused re-run: two ABBA cycles (0.2.0, #55, #55, 0.2.0) with at least 15 rounds per query. The 0.2.0 and #55 ranges don't overlap (Q30 in memory: 40.9–42.0 vs 45.6–46.3 ms; IC6: 22.4–22.6 vs 25.5–26.9 ms). Every result assertion passed, so the answers are unchanged.
For context, the same comparison showed the IC suite about 22–25% faster overall (IC12 about 7×). The 30-query suite was level overall (0.97 in memory, 1.00 lazy).
Possible cause (unverified)
#55 brought several execution changes at once: bounded-chunk CSR expansion (#31), iterative variable-length traversal, filter-column reuse, per-snapshot plan templates and schema-aware type checks. A candidate is per-batch overhead from bounded-chunk expansion on high fan-out traversals, but no profile has confirmed it. Other changes could be responsible instead.
Suggested next steps
- Compare
explain()output for Q30 and IC6 between 0.2.0 andmainto see whether the physical plans differ. - Profile both queries on
main(for example withsamplyorcargo flamegraphon a release build). - If expansion chunking is the cause, measure the effect of a larger chunk size on these queries, keeping the bounded-memory property fix(csr): stream high-degree expansion in bounded chunks #31 added.
How to reproduce
The 30-query suite is in graph-benchmark-ldbc and the IC suite in graph-benchmark-ldbc-complex, both in their lance_csr/ directories. Install a release wheel of main (cd python && uv run --no-sync maturin build --release), then run each engine directory's suite with the published flags, overlaying the wheel with uv run --frozen --with <wheel>. Select one query with -k query30 or -k query6, and set LANCE_CSR_MODE=memory or lazy.
Activity
prrao87 commentedon Oct 31, 2026
Closing this: both queries are back at 0.2.0's times on current
main. No single PR fixed it. IC6 had recovered by 0.4.0, and Q30 by the 0.5.0 release check.Means from the
CONTRIBUTING.mdharness (release wheels, Apple M5, 24 GB, macOS 26.6.2). The 0.2.0 and #55 columns are from this issue; 0.4.0 is the PyPI wheel from the 0.5.0 release check;mainis a85f5f7, measured for #97.mainThe two
mainruns of each query were within 1.4% (Q30 in memory), 3.3% (Q30 lazy) and 1.7% (IC6) of each other, well inside the 15 to 20% run-to-run rangeCONTRIBUTING.mdtreats as noise. Results checked out in every run.