Repository navigation
Cache resolved streams in wide part reader - #131011
Conversation
Stream name and average value size hint are resolved once for every stream known in `MergeTreeReaderWide::addStreams`. Substreams discovered only by the prefix (such as those of `Dynamic` and `JSON`) are still resolved per call.
Use less temporary strings in `getNameForSubstreamPath`. `escapeForFileName` reserves the result upfront and returns the input as is when nothing needs escaping.
|
Workflow [PR], commit [da01bbf] Summary: ✅
AI ReviewSummaryReviewed #131011 at Final VerdictStatus: ✅ Approve |
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Object file sizes6 object files changed (+28.89 KiB total), 0 added.
711 more object files are built by the master warmup baseline only (it builds every object-file target, a pull request build only Slowest function optimization changes (ThinLTO)Median per-function time ratio to the master baseline:
Compile time of recompiled translation units10 translation units recompiled, 29 s compile time in total, 10 of them have a recent master baseline. |
|
I checked the CI report for da01bbf: there are no public CI failures to fix. All 118 executed jobs are OK (81 skipped).
|

Resolve stream name and average value size hint once for known streams in
MergeTreeReaderWide::addStreams.This avoids stream name resolution per granule (e.g. in
MergeTreeReaderWide::getStreamand value size hint callbacks inreadData).Streams discovered while deserializing the prefix (such as those of
DynamicandJSON) are still resolved per call. Since the prefix is deserialized by multiple threads in parallel, we'd need some synchronization for the resolved streams collection, so, to keep this PR small, caching them can be implemented as a follow-up if necessary.Also, some temporary copies are avoided in
getNameForSubstreamPathandescapeForFileNamegains a fast path for names that need no escaping.This change improves reads of many short mark ranges from columns with many substreams, like the ones of the proposed native histograms implementation for the
TimeSeriesengine #122051.On a
c8g.8xlargemachine the new test shows a 1.3x to 1.75x speedup over master commit 039d5de4.Related: #130784
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Workflow [PR]
Sync PR [sync-upstream/pr/131011]
Version info
26.11.1.2457-master(included in26.11and later)