Skip to content

perf: Jackson Codec allocation improvements#1609

Merged
fvallenilla merged 2 commits intoNetflix:2.xfrom
jasonk000:jkoch/deserialize-buffer-fixes
Jan 16, 2026
Merged

perf: Jackson Codec allocation improvements#1609
fvallenilla merged 2 commits intoNetflix:2.xfrom
jasonk000:jkoch/deserialize-buffer-fixes

Conversation

@jasonk000
Copy link
Copy Markdown
Member

Two changes, (1) the getText toUpperCase call gets a slight transform to avoid a lambda capture. More significantly, we (2) introduce a mutable ArrayCharBuffer and StringCharBuffer to avoid repeated allocations of the buffer themselves. The buffers are only used during intermediate calls, and, the class is clearly marked as not-thread-safe and is attached to independent ObjectReader.

@jasonk000 jasonk000 changed the title Jackson Codec allocation improvements perf: Jackson Codec allocation improvements Jan 12, 2026
CharBuffer otherBuffer = (CharBuffer) other;
if (otherBuffer.length() == length && otherBuffer.variant() == variant) {
OfInt otherText = otherBuffer.chars();
for (int i = offset; i < offset + length; i++) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch here

@fvallenilla fvallenilla merged commit 5330646 into Netflix:2.x Jan 16, 2026
1 check passed
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