-
Committer:
John Arbash Meinel
-
Date:
2009-03-04 02:54:10 UTC
-
mto:
(4274.1.1 1.15-btree-intern)
-
mto:
This revision was merged to the branch mainline in
revision
4275.
-
Revision ID:
john@arbash-meinel.com-20090304025410-pzr7phpvarv25jea
Use intern() instead of _get_cached_ascii for getting unique revision_ids and file_ids.
intern() puts the strings in a dict (similar to what we do), but it does so
without increasing the refcount, so intern()ed strings do not have
unlimited lifetime.
This allows us to avoid duplicate copies in memory, without having an unlimited cache.
Further, we avoid keeping a Unicode representation of the string around,
as we no longer use unicode revision_ids or file_ids in the codebase.