Navigation Menu

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 unnecessary allocations in StompDecoder#unescape #29443

Conversation

dreis2211
Copy link
Contributor

Hi,

I noticed in one of our applications that a tiny amount (0,5-1%) of allocations is caused by StompDecoder#unescape. The unfortunate bit is that there is actually no unescaping needed in most of the cases. This PR avoids unnecessary allocations if the String to unescape is not containing any \ character.

Cheers,
Christoph

@dreis2211 dreis2211 force-pushed the avoid-allocations-stompdecoder-unescape branch from 102cfef to d505a90 Compare November 7, 2022 19:54
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Nov 7, 2022
@sbrannen sbrannen self-assigned this Nov 8, 2022
@sbrannen sbrannen added type: enhancement A general enhancement in: messaging Issues in messaging modules (jms, messaging) and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Nov 8, 2022
@sbrannen sbrannen added this to the 5.3.24 milestone Nov 8, 2022
@sbrannen sbrannen changed the title Avoid allocations from StompDecoder#unescape Avoid unnecessary StringBuilder allocation in StompDecoder#unescape Nov 8, 2022
@sbrannen sbrannen changed the title Avoid unnecessary StringBuilder allocation in StompDecoder#unescape Avoid unnecessary allocations in StompDecoder#unescape Nov 8, 2022
@sbrannen sbrannen closed this in 55b258f Nov 8, 2022
@sbrannen
Copy link
Member

sbrannen commented Nov 8, 2022

This has been merged into 5.3.x and main.

Thanks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: messaging Issues in messaging modules (jms, messaging) type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants