Cursor::populate_key#725
Merged
frankmcsherry merged 3 commits intoTimelyDataflow:master-nextfrom Apr 26, 2026
Merged
Conversation
cd4918f to
d6f9667
Compare
d6f9667 to
b61b448
Compare
frankmcsherry
added a commit
that referenced
this pull request
Apr 29, 2026
* Restore pre-#725 spines.rs and inline EditList::load Brings back the spines arrangement bake-off (deleted in #724 Spring cleaning, then RHH-dependent) with three modes: `key` (OrdKeySpine), `val` (OrdValSpine with Val=()), and `col` (columnar ValSpine via the columnar module added in #730). All three feed the same Vec-shaped input collections through one driver loop; `col` repacks via a small in-dataflow `unary` (`ToRecorded`) that builds `RecordedUpdates` containers before `arrange_core`. Bisecting against the example exposed a regression introduced in #725: EditList::load now delegates to populate_key, which seek_keys + checks + rewinds vals on every call. In the merge-join inner loop (join.rs Ordering::Equal arm), the cursor is already positioned by the upstream `match trace_key.cmp(&batch_key)` work, so the seek is redundant. Repeated 1M times in the spines query phase, this added ~3s (+40% queries time vs pre-#725 baseline). Restoring EditList::load to its pre-#725 division of labor — assume the cursor is positioned, walk vals inline — recovers performance. populate_key and replay_key keep the seek for callers that legitimately need it (reduce, ValueHistory). The Option-based meet API from #725 stays. Measurements (1M keys, 1000 size, key mode): - v0.23.0 baseline: 6.56s queries - pre-#725 (f4e7550): 7.16s queries - master HEAD before this commit: 10.12s queries - this commit: 7.00s queries Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Tighten up spines examples * Extract common target columnar size * TrieChunker work * De-penalize col in spiners.rs --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR starts to investigate a "bulk" data load, which I think is probably the right direction, allowing a
C: Cursorto populate anEditListbehind its implementation abstraction, and then users can interact with the edit lists without returning to the cursor's iterators. This is meant to give cursors the ability to be more thoughtful about data loading, using "internal iteration" idioms rather than exposing their iterators outwards and relying on folks using them.At the moment, this gives a modest reduction in binary size just from the removal of closures passed around, but the intent is that more fully developed it would allow the stack of cursors to move larger collections of updates around, rather than bouncing in and out of cursor navigation. Eventually,
Cursor::populate_keysin the plural, and general bulk loading for supplied sets of keys. For the moment, this is potentially either mergeable as is, or .. we can wait for a bit ofEditListevolution that should be coming down the pipe (trait simplification, but also acolumnarbackbone).