Skip to content

reduce smile buffer expansion - #751

Merged
cowtowncoder merged 1 commit into
FasterXML:3.xfrom
pjfanning:smile-buffer-size
Aug 13, 2026
Merged

reduce smile buffer expansion#751
cowtowncoder merged 1 commit into
FasterXML:3.xfrom
pjfanning:smile-buffer-size

Conversation

@pjfanning

Copy link
Copy Markdown
Member

Suggested by Claude AI and looks plausible

The fix changes len + len + len + 2 (3x expansion + header) to len + 2 (just header) in writeRawUTF8String, since the input bytes are already UTF-8 encoded and don't need expansion. This avoids unnecessary falls to the slower _writeBytes streaming path for long strings that would comfortably fit in the buffer.

@github-actions

Copy link
Copy Markdown

🧪 Code Coverage Report

Coverage Type Coverage Change
📝 Instructions 76.90% = 0.00%
🔀 Branches 68.11% = 0.00%

@cowtowncoder
cowtowncoder merged commit 55c7396 into FasterXML:3.x Aug 13, 2026
3 checks passed
@pjfanning
pjfanning deleted the smile-buffer-size branch August 13, 2026 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants