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

Freeze Strings #833

Merged
merged 1 commit into from
Jan 21, 2024
Merged

Freeze Strings #833

merged 1 commit into from
Jan 21, 2024

Conversation

swiknaba
Copy link
Contributor

At work, we've been using this gem at scale (serving ~ 20-100M req/month), and detected this gem to pollute memory by allocating way too many strings.

We've been running this adjustment of freezing multiple strings for six months now without issues (and measurably lower memory footprint).

Sadly, I couldn't find our exact memory profiling results anymore (we did extensive before/after tests using the memory profiler gem and observing memory footprint on the servers).

I remember, that strings for country codes got allocated multiple times before, and only once after freeze strings.

Thank you for maintaining open source :-)

@pmor
Copy link
Member

pmor commented Jan 21, 2024

Good one 👍, thanks for the PR

@pmor pmor merged commit 38e8223 into countries:master Jan 21, 2024
8 of 9 checks passed
@swiknaba swiknaba deleted the freeze-strings branch January 21, 2024 19:28
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

2 participants