Skip to content

protozero: remove Append() and its fastpath - #7267

Draft
LalitMaganti wants to merge 1 commit into
dev/lalitm/zerocopy-3-httpserverfrom
dev/lalitm/zerocopy-4-drop-append
Draft

protozero: remove Append() and its fastpath#7267
LalitMaganti wants to merge 1 commit into
dev/lalitm/zerocopy-3-httpserverfrom
dev/lalitm/zerocopy-4-drop-append

Conversation

@LalitMaganti

@LalitMaganti LalitMaganti commented Aug 28, 2026

Copy link
Copy Markdown
Member

Append()'s fastpath returned messages pointing into the caller's buffer,
valid only until the next call. That is why RemoteTraceProcessor had to
hoist its read buffer out of the loop, and it is what stops a Message
from owning its storage. Every caller now writes through BeginWrite(),
so both can go.

Also collapses RingBufferMessageReader into ProtoRingBuffer: the virtual
had a single production implementation, and a test-only subclass whose
coverage the ProtoRingBuffer tests subsume.

The benchmarks added to motivate the switch go too: their "before" arm
is the staging buffer this removes.

@LalitMaganti
LalitMaganti requested a review from a team as a code owner August 28, 2026 01:34
@LalitMaganti
LalitMaganti force-pushed the dev/lalitm/zerocopy-4-drop-append branch from 4f9cf69 to 3d392e0 Compare August 28, 2026 01:40
@LalitMaganti
LalitMaganti force-pushed the dev/lalitm/zerocopy-4-drop-append branch from 3d392e0 to c575f83 Compare August 28, 2026 14:30
@LalitMaganti
LalitMaganti force-pushed the dev/lalitm/zerocopy-4-drop-append branch from c575f83 to a411ee2 Compare August 28, 2026 15:10
@LalitMaganti
LalitMaganti force-pushed the dev/lalitm/zerocopy-4-drop-append branch from a411ee2 to 14a7bf4 Compare August 28, 2026 15:31
@LalitMaganti
LalitMaganti force-pushed the dev/lalitm/zerocopy-4-drop-append branch from 14a7bf4 to 618e203 Compare August 28, 2026 15:32
@LalitMaganti
LalitMaganti marked this pull request as draft August 28, 2026 15:34
Append()'s fastpath returned messages pointing into the caller's buffer,
valid only until the next call. That is why RemoteTraceProcessor had to
hoist its read buffer out of the loop, and it is what stops a Message
from owning its storage. Every caller now writes through BeginWrite(),
so both can go.

Also collapses RingBufferMessageReader into ProtoRingBuffer: the virtual
had a single production implementation, and a test-only subclass whose
coverage the ProtoRingBuffer tests subsume.

The benchmarks added to motivate the switch go too: their "before" arm
is the staging buffer this removes.
@LalitMaganti
LalitMaganti force-pushed the dev/lalitm/zerocopy-4-drop-append branch from 618e203 to 9a60ae5 Compare August 28, 2026 15:38
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.

2 participants