At http://bzr.arbash-meinel.com/plugins/groupcompress_rabin
------------------------------------------------------------
revno: 66
revision-id: [email protected]
parent: [email protected]
committer: John Arbash Meinel <[email protected]>
branch nick: groupcompress_rabin
timestamp: Fri 2009-02-27 22:46:39 -0600
message:
Add some profiling comments.
=== modified file 'groupcompress.py'
--- a/groupcompress.py 2009-02-28 04:43:47 +0000
+++ b/groupcompress.py 2009-02-28 04:46:39 +0000
@@ -166,6 +166,7 @@
new_chunks = []
else:
new_chunks = ['label: %s\nsha1: %s\n' % (label, sha1)]
+ # PROF: 5s to this constant extra joining
source_text = ''.join(self.lines)
# XXX: We have a few possibilities here. We could consider a few
# different 'previous' windows, such as only the initial text, we
@@ -173,7 +174,9 @@
# we could try a delta against whatever the last delta we
# computed, (the idea being we just computed the delta_index, so
# we re-use it here, and see if that is good enough, etc)
+ # PROF: 15s to building the delta index
delta_index = _groupcompress_c.make_delta_index(source_text)
+ # PROF: only 0.67s to actually create a delta
delta = delta_index.make_delta(target_text)
if (delta is None
or len(delta) > len(target_text) / 2):
--
bazaar-commits mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/bazaar-commits