Skip to content

feat: Convert many toReadableSequentialData to toPbjReader - #918

Open
ldintr wants to merge 1 commit into
ldintr-writeIntegerListfrom
ldintr-toPbjReader
Open

feat: Convert many toReadableSequentialData to toPbjReader#918
ldintr wants to merge 1 commit into
ldintr-writeIntegerListfrom
ldintr-toPbjReader

Conversation

@ldintr

@ldintr ldintr commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Closes out remaining spots (gRPC client PbjGrpcCall, generated ServiceGenerator dispatch, Codec.parse(Bytes)/parseStrict(Bytes)) still using Bytes.toReadableSequentialData(), switching them to Bytes.toPbjReader()/new Codec.parse(Bytes, ...) overloads. Public behavior unchanged; tests/mocks updated.

Overview: PbjReader/PbjWriter are a leaner, buffer-reusing alternative to the existing ReadableSequentialData/WritableSequentialData read/write path used by Codec, ProtoParserTools/ProtoWriterTools, and the pbj-compiler generators. They reuse an internal ~16KB (L1-cache-sized) buffer across many parse/write calls instead of allocating per call, avoid checked-exception-based control flow by recording a sticky internal error code instead, and split hot-path operations (e.g. zigzag vs. non-zigzag varints, direct UTF-8 decode into a reusable char[]) into dedicated fast methods.

@ldintr
ldintr requested review from a team as code owners August 31, 2026 16:48
@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown

JUnit Test Report

   523 files  ±0     523 suites  ±0   31s ⏱️ +4s
 1 645 tests +2   1 641 ✅ +2   4 💤 ±0  0 ❌ ±0 
10 863 runs  +2  10 835 ✅ +2  28 💤 ±0  0 ❌ ±0 

Results for commit 5251d33. ± Comparison against base commit 06cf459.

♻️ This comment has been updated with latest results.

@ldintr ldintr self-assigned this Aug 31, 2026
@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown

Integration Test Report

    428 files  ±0      428 suites  ±0   17m 40s ⏱️ - 5m 0s
115 048 tests ±0  115 048 ✅ ±0  0 💤 ±0  0 ❌ ±0 
115 292 runs  ±0  115 292 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 5251d33. ± Comparison against base commit 06cf459.

♻️ This comment has been updated with latest results.

Signed-off-by: ldintr <levo.d@swirldslabs.com>
@ldintr
ldintr requested review from a team as code owners September 10, 2026 19:07
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.

1 participant