Skip to content

perf: bound header buffers and reuse builders in StreamMessageProducer#903

Open
sebthom wants to merge 1 commit intoeclipse-lsp4j:mainfrom
sebthom:StreamMessageProducer
Open

perf: bound header buffers and reuse builders in StreamMessageProducer#903
sebthom wants to merge 1 commit intoeclipse-lsp4j:mainfrom
sebthom:StreamMessageProducer

Conversation

@sebthom
Copy link
Contributor

@sebthom sebthom commented Oct 25, 2025

Replace nullable builders with reusable instances to reduce allocations during header scan; avoid repeated StringBuilder creation.

Replace nullable builders with reusable instances to reduce allocations
during header scan; avoid repeated StringBuilder creation.
@sebthom sebthom force-pushed the StreamMessageProducer branch from 02118bf to 6b58645 Compare November 8, 2025 20:18
Copy link
Contributor

@jonahgraham jonahgraham left a comment

Choose a reason for hiding this comment

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

Following on from discussions in #902 it is not obvious that there are performance improvements here. However I like this change as it simplifies null analysis. I quite prefer final variables over non-final whenever possible 😄

I approve, but I am going to hold off submitting until conversations in #902 are resolved.

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