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

Add: use sys.intern() on strings for classes using __slots__ #14

Merged
merged 1 commit into from Sep 24, 2020

Conversation

TrueBrain
Copy link
Member

eints has a lot of duplicated strings, especially when loading
from JSON. For example, every language has a copy of the base-string
it belongs to. Without deduplication, OpenTTD uses ~350MB RAM. With
deduplication this drops to ~280MB RAM, a good 60MB RAM gain.

eints has a lot of duplicated strings, especially when loading
from JSON. For example, every language has a copy of the base-string
it belongs to. Without deduplication, OpenTTD uses ~350MB RAM. With
deduplication this drops to ~280MB RAM, a good 60MB RAM gain.
@TrueBrain TrueBrain merged commit 07c9020 into OpenTTD:master Sep 24, 2020
@TrueBrain TrueBrain deleted the intern_strings branch September 24, 2020 21:27
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