Rev 4785: interning items seems to be a net loss. It costs another 5s runtime, in http://bazaar.launchpad.net/~jameinel/bzr/2.1-static-tuple-chk-map

John Arbash Meinel john at arbash-meinel.com
Fri Oct 23 17:05:06 BST 2009


At http://bazaar.launchpad.net/~jameinel/bzr/2.1-static-tuple-chk-map

------------------------------------------------------------
revno: 4785
revision-id: john at arbash-meinel.com-20091023160453-orqt3q2e03wqcb1b
parent: john at arbash-meinel.com-20091023155427-7td5hrdhhyocsn6v
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 2.1-static-tuple-chk-map
timestamp: Fri 2009-10-23 11:04:53 -0500
message:
  interning items seems to be a net loss. It costs another 5s runtime,
  and *doesn't* save any memory.
-------------- next part --------------
=== modified file 'bzrlib/chk_map.py'
--- a/bzrlib/chk_map.py	2009-10-23 15:54:27 +0000
+++ b/bzrlib/chk_map.py	2009-10-23 16:04:53 +0000
@@ -1520,7 +1520,7 @@
                 #       may not be an actual benefit to interning this tuple.
                 #       The file_key should already be interned. If it isn't we
                 #       need to look into it.
-                items = [as_st(item) for item in node._items.iteritems()]
+                items = [as_st(item).intern() for item in node._items.iteritems()]
             yield record, node, prefix_refs, items
 
     def _read_old_roots(self):



More information about the bazaar-commits mailing list