Repository navigation
Bulk-copy byte fields on the read path - #859
Open
DanielThomas wants to merge 5 commits into
Open
DanielThomas wants to merge 5 commits into
DanielThomas wants to merge 5 commits into
Conversation
DanielThomas
force-pushed
the
dannyt/bulk-byte-field-reads
branch
2 times, most recently
from
September 23, 2026 03:21
b8fef45 to
6fcc882
Compare
DanielThomas
added this pull request to stack #857
September 23, 2026 03:37
DanielThomas
marked this pull request as ready for review
September 23, 2026 03:54
DanielThomas
force-pushed
the
dannyt/bulk-byte-field-reads
branch
from
September 23, 2026 04:15
6fcc882 to
106e7d9
Compare
DanielThomas
force-pushed
the
dannyt/bulk-byte-field-reads
branch
from
September 23, 2026 06:41
106e7d9 to
ef404e8
Compare
DanielThomas
force-pushed
the
dannyt/bulk-byte-field-reads
branch
from
September 26, 2026 02:20
ef404e8 to
5832ed8
Compare
Sunjeet
reviewed
Oct 2, 2026
Sunjeet
reviewed
Oct 2, 2026
DanielThomas
force-pushed
the
dannyt/bulk-byte-field-reads
branch
from
October 5, 2026 04:49
e2974b6 to
9113f22
Compare
joegoogle123
force-pushed
the
dannyt/bulk-byte-field-reads
branch
from
October 5, 2026 14:02
9113f22 to
4b015a5
Compare
jasonk000
approved these changes
Oct 5, 2026
DanielThomas
force-pushed
the
dannyt/bulk-byte-field-reads
branch
2 times, most recently
from
October 6, 2026 04:06
4b1f582 to
f5cf646
Compare
DanielThomas
force-pushed
the
dannyt/bulk-byte-field-reads
branch
from
October 7, 2026 02:48
f5cf646 to
257b31e
Compare
Member
Author
|
Gated bulk byte-field copies behind |
DanielThomas
force-pushed
the
dannyt/bulk-byte-field-reads
branch
from
October 7, 2026 02:54
257b31e to
62a75fb
Compare
Add a ByteData range-copy operation with segment-aware on-heap and mapped-buffer implementations. Use it when materializing BYTES fields instead of resolving storage one byte at a time. Preserve the existing read validation and retry protocol, and cover segment and mapped-buffer boundaries with on-heap and shared-memory round trips.
Document allocating and reusable benchmark variants and shared-buffer read safety. Co-authored-by: Jason Koch <jkoch@netflix.com>
DanielThomas
force-pushed
the
dannyt/bulk-byte-field-reads
branch
from
October 7, 2026 03:02
62a75fb to
5555731
Compare
This branch has not been deployed
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.
HollowObjectTypeReadStateShard.readBytes()currently materializes aBYTESfield by callingByteData.get()for every byte. For segmented on-heap data, each call repeats interface dispatch, segment lookup, and offset masking.Add
ByteData.copyTo(...)and use it to materialize byte fields in bulk:SegmentedByteArraycopies one contiguous segment range at a time withSystem.arraycopy.ArrayByteDatausesSystem.arraycopydirectly.EncodedByteBuffercopies chunks from duplicated mapped buffers, preserving thread-safe reads.ByteDataimplementations retain a byte-by-byte default.Benchmark
JMH on Java 8/x86-64. Each invocation includes allocation of the returned byte array. The source begins 17 bytes before a segment boundary, so values of 32 bytes and larger cross at least one boundary.
On Java 25 on the same host, the corresponding improvements were 34.3%, 64.7%, 91.9%, and 95.3%.