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

Enable frozen_string_literal #65

Closed

Conversation

casperisfine
Copy link

Net::HTTP contain quite a few string literals that would benefit from being interned.

Net::HTTP contain quite a few string literals that would
benefit from being interned.
@byroot byroot requested review from jeremyevans and nobu August 20, 2022 10:04
Copy link
Contributor

@jeremyevans jeremyevans left a comment

Choose a reason for hiding this comment

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

The implementation looks fine to me, but this change probably needs to be approved by @nurse.

@baweaver
Copy link
Contributor

Have we taken a look at merging this one? Probably needs to be rebased though.

@technicalpickles
Copy link
Contributor

@baweaver and I were pairing on some performance issues last month with memory_profiler, and stumbled upon net/http in a few spots

For our one system spec, we're seeing "-" allocated 11374 times, and "" 4563 times in net/http/header. Plus 3425 allocations of " "and 5701 allocations of "" in net/http/response. Using frozen string literally would take care of all those.

@hsbt
Copy link
Member

hsbt commented Aug 31, 2023

frozen_string_literal is enabled by #144

@hsbt hsbt closed this Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

6 participants