Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Intern lots of strings #666

Merged
merged 6 commits into from Mar 23, 2016

Conversation

Projects
None yet
3 participants
Owner

erikjohnston commented Mar 23, 2016

No description provided.

erikjohnston added some commits Mar 22, 2016

@oddvar oddvar added the in progress label Mar 23, 2016

@NegativeMjark NegativeMjark commented on an outdated diff Mar 23, 2016

synapse/util/caches/__init__.py
+
+ for key in intern_str_keys:
+ val = dictionary.get(key, None)
+ if val is not None:
+ dictionary[key] = intern(val.encode('ascii'))
+
+ for key in intern_unicode_keys:
+ val = dictionary.get(key, None)
+ if val is not None:
+ dictionary[key] = intern_string(val)
+
+ return dictionary
+
+
+def _intern_key(key):
+ return KNOWN_KEYS.get(key, key)
@NegativeMjark

NegativeMjark Mar 23, 2016

Contributor

Does this need to be a function.

Contributor

NegativeMjark commented Mar 23, 2016

LGTM

@erikjohnston erikjohnston merged commit 647b041 into develop Mar 23, 2016

8 checks passed

Flake8 + Packaging (Commit) Build #205 origin/erikj/intern succeeded in 27 sec
Details
Flake8 + Packaging (Merged PR) Build finished.
Details
Sytest Postgres (Commit) Build #208 origin/erikj/intern succeeded in 5 min 26 sec
Details
Sytest Postgres (Merged PR) Build finished.
Details
Sytest SQLite (Commit) Build #209 origin/erikj/intern succeeded in 4 min 27 sec
Details
Sytest SQLite (Merged PR) Build finished.
Details
Unit Tests (Commit) Build #250 origin/erikj/intern succeeded in 1 min 16 sec
Details
Unit Tests (Merged PR) Build finished.
Details

@oddvar oddvar removed the in progress label Mar 23, 2016

@richvdh richvdh deleted the erikj/intern branch Dec 1, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment