Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid temporary String object creation in StreamMessageProducer #816

Merged
merged 1 commit into from Mar 2, 2024

Conversation

sebthom
Copy link
Contributor

@sebthom sebthom commented Feb 29, 2024

This can reduce the likeliness of OOMs when dealing with large response messages from LS servers. See discussion at #815

@sebthom sebthom force-pushed the memory branch 2 times, most recently from b650ae6 to 446a98a Compare February 29, 2024 21:59
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.

LGTM - I have trouble imagining it will fully solving your OOM, but saving the 160M is definitely worthwhile.

I'll leave it open for now for others to have a look. But assuming no dissenting views it can be merged soonish.

@jonahgraham jonahgraham added this to the 0.23.0 milestone Feb 29, 2024
@sebthom
Copy link
Contributor Author

sebthom commented Feb 29, 2024

No, it won't solve the issue but it allows for processing of larger messages without getting an OOM.

Copy link
Contributor

@pisv pisv left a comment

Choose a reason for hiding this comment

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

@sebthom Thank you for the enhancement!

LGTM. Just a couple of nitpicks, which may be ignored :-)

@sebthom sebthom mentioned this pull request Mar 1, 2024
@jonahgraham
Copy link
Contributor

I'll leave it open for now for others to have a look. But assuming no dissenting views it can be merged soonish.

Thanks to @pisv we have a positive review - even better than simply no dissenting views! Waiting to hear from @sebthom if this commit or #817 should be submitted first (as I assume some amount of merging conflict resolution may be required)

@sebthom
Copy link
Contributor Author

sebthom commented Mar 1, 2024

I'll leave it open for now for others to have a look. But assuming no dissenting views it can be merged soonish.

Thanks to @pisv we have a positive review - even better than simply no dissenting views! Waiting to hear from @sebthom if this commit or #817 should be submitted first (as I assume some amount of merging conflict resolution may be required)

Rebasing this PR is easier, so I would prefer if #817 gets merged first.

@jonahgraham
Copy link
Contributor

Thanks @sebthom - I'll hold off until @pisv reviews #817

@pisv feel free to submit #817 if you approve (and #816 once it is rebased)

@pisv pisv merged commit 37db32c into eclipse-lsp4j:main Mar 2, 2024
4 checks passed
@sebthom sebthom deleted the memory branch March 18, 2024 18:34
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.

None yet

3 participants