Skip to content

Avoid per-element copies when iterating repeated proto fields. - #2405

Open
copybara-service[bot] wants to merge 1 commit into
masterfrom
test_1005746075
Open

copybara-service[bot] wants to merge 1 commit into
masterfrom
test_1005746075

Conversation

@copybara-service

@copybara-service copybara-service Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Avoid per-element copies when iterating repeated proto fields.

ParsedRepeatedFieldValue::NewIterator, ForEach, and Contains now borrow
elements of unsafe containers, matching Get. FromLegacyList evaluates a
FieldBackedListImpl over a heap-allocated message as an
UnsafeParsedRepeatedFieldValue, so repeated fields bound with
BindProtoToActivation take the same path.

@copybara-service
copybara-service Bot force-pushed the test_1005746075 branch 4 times, most recently from 30bd99b to d9413ee Compare October 26, 2026 20:01
@copybara-service copybara-service Bot changed the title Iterate repeated proto fields without per-element copies or CelValue round trips. Avoid per-element copies when iterating repeated proto fields. Oct 26, 2026
`ParsedRepeatedFieldValue::NewIterator`, `ForEach`, and `Contains` now borrow
elements of unsafe containers, matching `Get`. `FromLegacyList` evaluates a
`FieldBackedListImpl` over a heap-allocated message as an
`UnsafeParsedRepeatedFieldValue`, so repeated fields bound with
`BindProtoToActivation` take the same path.

PiperOrigin-RevId: 1005746075
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants