Repository navigation
perf: reserve repeated message decode capacity - #1454
Open
perfloop-agent wants to merge 2 commits into
Open
perfloop-agent wants to merge 2 commits into
perfloop-agent wants to merge 2 commits into
Conversation
Carry generated field tags through DecodeContext so repeated message decoding can reserve bounded capacity for contiguous same-tag fields in the current message scope. Inline the repeated-message merge helper for generated call sites and scan canonical one-byte envelopes directly; the generic scanner remains the fallback for all other inputs. Keep the nested metadata and capacity conditions stable with a scoped Clippy allowance.
perfloop-agent
force-pushed
the
perfloop-pr-open-9k0k8cb9z6
branch
from
August 9, 2026 11:29
f76cf0e to
3d0cfc5
Compare
|
Related to #1451 |
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.
Summary
DecodeContextsomessage::merge_repeatedcan reserve capacity for contiguous same-tag fields after decoding the first element.merge_repeatedAPI. The narrowly scoped Clippy allowance keeps the existing nested condition compatible with the crate's edition 2021.Compatibility and limits
Reservation only considers complete fields in the current buffer chunk and enclosing message scope, and remains bounded by the existing lookahead and reservation limits. Fragmented, incomplete, non-contiguous, or hand-written
Messagedecode paths retain the existing fallback behavior. Decoded output is unchanged.Performance
Workload:
repeated-message-decode-64allocation_calls/opreallocation_calls/oprequested_allocation_bytes/opWorkload:
repeated-message-decode-4096allocation_calls/opreallocation_calls/oprequested_allocation_bytes/opTesting
Ran formatting, warning-denied Clippy including Rust 1.95, no-default-features checking, feature-specific test configurations, no-recursion-limit tests, benchmark compilation, and warning-denied rustdoc.
All 8 declared correctness checks passed.
Authored and verified by Perfloop: every claim above was co-measured on both trees and independently re-verified before submission — the full record is public: case_pfmqga57j8. Replies from this account are human-approved, and a human operator is accountable for this contribution.