Repository navigation
perf(layout): skip chunks without selected rows - #10491
Conversation
MaskFuture now holds a ready mask directly instead of in a boxed shared future, and is_ready() reports it. Ready masks and their slices are ready; polling one returns the mask at once. The chunked reader skips chunks whose ready mask selects no rows: they are not read, decoded or filtered and add no empty chunk to the result. The flat reader waits for its mask before its array and returns an empty array when no row is selected, so masks only known after a filter also skip the decode. A random read of 32 rows from a 64-chunk file used to yield 62 chunks, 39 of them empty, each exported to Arrow on its own. Signed-off-by: Robert Kruszewski <github@robertk.io> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
It had no callers. FutureExt::inspect works on a MaskFuture and is lazy too. Signed-off-by: Robert Kruszewski <github@robertk.io> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merging this PR will not alter performance
|
is_ready() now asks the shared future whether it has completed, instead of an extra enum. MaskFuture::ready completes its future on construction, and a slice of a completed mask is ready too. MaskFuture::inspect is restored unchanged. Signed-off-by: Robert Kruszewski <github@robertk.io> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
peek() returns the mask of a completed future without polling it, so the chunked reader checks a chunk's mask in one call and never polls a pending one. Signed-off-by: Robert Kruszewski <github@robertk.io> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Polar Signals Profiling ResultsLatest Run
Powered by Polar Signals Cloud |
Benchmarks: PolarSignals Profiling 📖Commits: PR datafusion / vortex-file-compressed / ns (1.001x ➖, 0↑ 0↓)
No file size changes detected. |
Benchmarks: FineWeb NVMe 📖Commits: PR How to read Verdict and Engines
datafusion / vortex-file-compressed / ns (1.021x ➖, 0↑ 1↓)
datafusion / parquet / ns (0.987x ➖, 0↑ 0↓)
duckdb / vortex-file-compressed / ns (1.142x ❌, 1↑ 4↓)
duckdb / parquet / ns (1.003x ➖, 0↑ 0↓)
No file size changes detected. |
Benchmarks: TPC-H SF=1 on NVME 📖Commits: PR How to read Verdict and Engines
datafusion / vortex-file-compressed / ns (0.995x ➖, 0↑ 0↓)
datafusion / parquet / ns (1.000x ➖, 0↑ 0↓)
duckdb / vortex-file-compressed / ns (1.007x ➖, 0↑ 0↓)
duckdb / parquet / ns (0.998x ➖, 0↑ 0↓)
No file size changes detected. |
Benchmarks: Clickbench on NVME 📖Commits: PR How to read Verdict and Engines
datafusion / vortex-file-compressed / ns (1.011x ➖, 0↑ 1↓)
datafusion / parquet / ns (1.000x ➖, 0↑ 0↓)
duckdb / vortex-file-compressed / ns (0.992x ➖, 4↑ 2↓)
duckdb / parquet / ns (0.984x ➖, 2↑ 1↓)
No file size changes detected. |
Benchmarks: TPC-DS SF=1 on NVME 📖Commits: PR How to read Verdict and Engines
datafusion / vortex-file-compressed / ns (0.998x ➖, 0↑ 1↓)
datafusion / parquet / ns (0.998x ➖, 0↑ 0↓)
duckdb / vortex-file-compressed / ns (0.989x ➖, 7↑ 2↓)
duckdb / parquet / ns (1.003x ➖, 1↑ 2↓)
No file size changes detected. |
Benchmarks: TPC-H SF=10 on NVME 📖Commits: PR How to read Verdict and Engines
datafusion / vortex-file-compressed / ns (0.990x ➖, 0↑ 0↓)
datafusion / parquet / ns (0.999x ➖, 0↑ 0↓)
duckdb / vortex-file-compressed / ns (0.991x ➖, 0↑ 0↓)
duckdb / parquet / ns (1.009x ➖, 0↑ 0↓)
No file size changes detected. |
Benchmarks: TPC-H SF=1 on S3 📖Commits: PR How to read Verdict and Engines
datafusion / vortex-file-compressed / ns (1.034x ➖, 0↑ 3↓)
datafusion / parquet / ns (0.894x ➖, 1↑ 1↓)
duckdb / vortex-file-compressed / ns (0.996x ➖, 0↑ 1↓)
duckdb / parquet / ns (0.925x ➖, 0↑ 0↓)
|
Benchmarks: Random Access 📖Commits: PR How to read Verdict and Engines
vortex / arrow-ipc / ns (0.967x ➖, 3↑ 1↓)
random-access / vortex-file-compressed / ns (0.972x ➖, 1↑ 0↓)
random-access / parquet / ns (0.998x ➖, 0↑ 0↓)
random-access / lance / ns (0.976x ➖, 0↑ 0↓)
|
Ready masks that after slicing have become all false or all true were still
making it through to the projection stage. Peek the masks before dispatching the
projection future if there's any work left to do and skip it if the mask is
already known