Rev 65: Create a wrapper function, so that lsprof will properly attribute time spent. in http://bzr.arbash-meinel.com/plugins/groupcompress_rabin

John Arbash Meinel john at arbash-meinel.com
Sat Feb 28 04:43:48 GMT 2009


At http://bzr.arbash-meinel.com/plugins/groupcompress_rabin

------------------------------------------------------------
revno: 65
revision-id: john at arbash-meinel.com-20090228044347-vjb5fzj5s9cd8a7c
parent: john at arbash-meinel.com-20090228042933-zdoupq6lka7lyvg9
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: groupcompress_rabin
timestamp: Fri 2009-02-27 22:43:47 -0600
message:
  Create a wrapper function, so that lsprof will properly attribute time spent.
-------------- next part --------------
=== modified file '_groupcompress_c.pyx'
--- a/_groupcompress_c.pyx	2009-02-28 04:28:02 +0000
+++ b/_groupcompress_c.pyx	2009-02-28 04:43:47 +0000
@@ -75,6 +75,10 @@
 #         free(val[0])
 #         val[0] = NULL
 
+def make_delta_index(source):
+    return DeltaIndex(source)
+
+
 cdef class DeltaIndex:
 
     cdef object _source
@@ -89,7 +93,6 @@
     def __init__(self, source):
         self._source = None
         self._index = NULL
-
         self._create_delta_index(source)
 
     def _create_delta_index(self, source):

=== modified file 'groupcompress.py'
--- a/groupcompress.py	2009-02-28 04:29:33 +0000
+++ b/groupcompress.py	2009-02-28 04:43:47 +0000
@@ -173,7 +173,7 @@
         #      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)
-        delta_index = _groupcompress_c.DeltaIndex(source_text)
+        delta_index = _groupcompress_c.make_delta_index(source_text)
         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