Rev 66: Add some profiling comments. in http://bzr.arbash-meinel.com/plugins/groupcompress_rabin
John Arbash Meinel
john at arbash-meinel.com
Sat Feb 28 04:46:41 GMT 2009
At http://bzr.arbash-meinel.com/plugins/groupcompress_rabin
------------------------------------------------------------
revno: 66
revision-id: john at arbash-meinel.com-20090228044639-zhrn3p7ykngc0zs4
parent: john at arbash-meinel.com-20090228044347-vjb5fzj5s9cd8a7c
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: groupcompress_rabin
timestamp: Fri 2009-02-27 22:46:39 -0600
message:
Add some profiling comments.
-------------- next part --------------
=== 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):
More information about the bazaar-commits
mailing list