Your browser sucks, JavaScript disabled! Gunnar's console needs JavaScript and WebAssembly. Git over SSH on port 2222 does not.

nordisk/knut

.nornir/graphar-chunk-codec-bench.md

graphar chunk codec — roundtrip coverage + light baseline

The through-line hot path of the graph warehouse is the chunk codec: write_chunk_bytes(&[RecordBatch], FileType) -> Vec<u8> and its inverse read_chunk_bytes(Bytes, FileType) -> Vec<RecordBatch> (crates/graphar/src/storage.rs) — every GraphAr vertex/edge chunk goes through it, for all five FileTypes (Parquet · ArrowIpc · Csv · Json · Orc).

What landed

crates/graphar/tests/chunk_roundtrip.rs — pure, in-memory, no network/container:

Baseline (this box, 1000-row batch, write+read/iter — light, not the record)

FileType µs/iter
ArrowIpc ~148 µs
Parquet ~2480 µs

Reading it

ArrowIpc is ~17× cheaper than Parquet for a small-chunk roundtrip (Parquet pays column-encode + footer/statistics cost). Implication for the "loop till times down" work: for hot, small, ephemeral chunks (cache/shuffle/intermediate), prefer ArrowIpc; keep Parquet for the durable columnar store where its compression/pushdown earns back the encode cost. Next bench step (bench box): sweep batch size + column mix, and measure the parquet write props (compression/dictionary) knobs against read pushdown.