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

Use encode! rather than encode to modify string in place #715

Merged
merged 1 commit into from
Mar 14, 2024

Conversation

sandbergja
Copy link
Member

This causes us to allocate slightly less memory. These strings are not retained for very long, but since this method is called so many times, it does result in more work for the garbage collector.

part of #695

This causes us to allocate slightly less memory.  These strings are not retained for very long, but since this method
is called so many times, it does result in more work for the garbage collector.
Copy link
Member

@christinach christinach left a comment

Choose a reason for hiding this comment

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

Thanks @sandbergja

@christinach christinach merged commit 006a0e5 into main Mar 14, 2024
7 checks passed
@christinach christinach deleted the encode-string-in-place branch March 14, 2024 18:01
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