Rev 70: map(int, revno_str.split('.')) shows up high on lsprof. in http://bzr.arbash-meinel.com/plugins/history_db

John Arbash Meinel john at arbash-meinel.com
Fri Apr 9 15:52:42 BST 2010


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

------------------------------------------------------------
revno: 70
revision-id: john at arbash-meinel.com-20100409145225-tr9v4kg1wefvzt15
parent: john at arbash-meinel.com-20100408212931-hacovas52zz2ir2h
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: history_db
timestamp: Fri 2010-04-09 09:52:25 -0500
message:
  map(int, revno_str.split('.')) shows up high on lsprof.
  
  We may want to switch to storing based on integer revno bits, and use
  either (0, 0, X) for the mainline or (-1, -1, X).
  
  However, our best bet is to avoid walking the mainline so much, right
  now, having to step-back 3.9M times (~3.2M sub-branch, 650k for unknown)
  is causing us to load 20M dotted_revno entries.
  
  The other possibility is to cache the mainline => dotted_revno data,
  which should help, but I'd like to avoid it for now.
-------------- next part --------------
=== modified file 'schema.py'
--- a/schema.py	2010-04-08 21:29:31 +0000
+++ b/schema.py	2010-04-09 14:52:25 +0000
@@ -65,6 +65,8 @@
 _create_statements.append(ghost_t)
 
 
+# TODO: Consider storing the data as 3-digit integer revnos, rather than a
+#       revno_str
 dotted_revno_t = """
 CREATE TABLE dotted_revno (
     tip_revision INTEGER REFERENCES revision NOT NULL,



More information about the bazaar-commits mailing list