Repository navigation
perf(router): box the plan nodes - #1533
Merged
Merged
Conversation
kamilkisiela
added this pull request to stack #1534
September 10, 2026 11:37
kamilkisiela
force-pushed
the
kamil-qp-cache-pr3
branch
from
September 10, 2026 11:40
80979c7 to
f241ac2
Compare
|
🐋 This PR was built and pushed to the following Docker images: Image Names: Platforms: Image Tags: |
kamilkisiela
marked this pull request as ready for review
September 10, 2026 13:54
dotansimha
approved these changes
Sep 10, 2026
`PlanNode` sizes every slot of every `Sequence` and `Parallel` list, whether or not that slot holds a fetch. Four of its eight variants were an order of magnitude larger than the rest, so a plan of ten sequenced nodes paid for ten `FetchNode`-sized slots regardless of what it actually contained. Box those four. The enum drops from 224 B to 40 B per slot; the ceiling is now `ConditionNode`, pinned in `stored_sizes_stay_small` alongside it so a future field there stays visible. The 184 B this saves per slot is smaller than it would have been before the previous commit, which took the inline parsed document out of `FetchNode` and `PlanNode` with it - 328 B to 224 B. Boxing first would have claimed 288 B and left the document change claiming less; the total is the same either way. `Box<T>` is transparent to serde in both directions, so the wire form does not move and no snapshot changes.
kamilkisiela
force-pushed
the
kamil-qp-cache-pr3
branch
from
September 11, 2026 09:12
624d018 to
42fe1f3
Compare
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.
PlanNode is an enum, so every variant takes as much space as its largest variant. Some of the variants have a subgraph fetch, and those were much larger than the rest. They are now boxed.