Rev 4637: Remove the gc enable/disable code. in http://bazaar.launchpad.net/~jameinel/bzr/1.19-known-graph-sorted
John Arbash Meinel
john at arbash-meinel.com
Mon Aug 17 19:17:17 BST 2009
At http://bazaar.launchpad.net/~jameinel/bzr/1.19-known-graph-sorted
------------------------------------------------------------
revno: 4637
revision-id: john at arbash-meinel.com-20090817181706-gm0g0k0ag9dnhowp
parent: john at arbash-meinel.com-20090817180349-bf2ba1ctth4ioyv6
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 1.19-known-graph-sorted
timestamp: Mon 2009-08-17 13:17:06 -0500
message:
Remove the gc enable/disable code.
It doesn't seem to have a specific benefit in real world testing.
Though a global gc.disable speeds up bzr log bzr.dev from 1.1s to 0.9s.
-------------- next part --------------
=== modified file 'bzrlib/_known_graph_pyx.pyx'
--- a/bzrlib/_known_graph_pyx.pyx 2009-08-17 18:03:49 +0000
+++ b/bzrlib/_known_graph_pyx.pyx 2009-08-17 18:17:06 +0000
@@ -130,20 +130,15 @@
:param parent_map: A dictionary mapping key => parent_keys
"""
- cdef int was_enabled
# tests at pre-allocating the node dict actually slowed things down
self._nodes = {}
# Maps {sorted(revision_id, revision_id): heads}
self._known_heads = {}
self.do_cache = int(do_cache)
- was_enabled = gc.isenabled()
- if was_enabled:
- gc.disable()
- # This allocates a lot of nodes but nothing that can be gc'd
- # disable gc while building
+ # TODO: consider disabling gc since we are allocating a lot of nodes
+ # that won't be collectable anyway. real world testing has not
+ # shown a specific impact, yet.
self._initialize_nodes(parent_map)
- if was_enabled:
- gc.enable()
self._find_gdfo()
def __dealloc__(self):
@@ -407,6 +402,9 @@
"""Compute the merge sorted graph output."""
cdef _MergeSorter sorter
+ # TODO: consider disabling gc since we are allocating a lot of nodes
+ # that won't be collectable anyway. real world testing has not
+ # shown a specific impact, yet.
sorter = _MergeSorter(self, tip_key)
return sorter.topo_order()
@@ -660,7 +658,7 @@
# We've set up the basic schedule, now we can continue processing the
# output.
- # TODO: This final loop costs us 40.0ms => 28.8ms (11ms, 25%) on
+ # Note: This final loop costs us 40.0ms => 28.8ms (11ms, 25%) on
# bzr.dev, to convert the internal Object representation into a
# Tuple representation...
# 2ms is walking the data and computing revno tuples
More information about the bazaar-commits
mailing list