~bzr-pqm/bzr/bzr.dev

  • Committer: John Arbash Meinel
  • Date: 2009-08-07 03:29:09 UTC
  • Revision ID: john@arbash-meinel.com-20090807032909-9xg0nwcqoxi9763y
Removing the min(keys) and max(keys) calls saves 100ms in the inner loop
(get_ancestry() over all of bzr.dev in a single index is 347ms => 245ms).
The current breakdown is roughly:
0.4789      0.1127   bzrlib.btree_index:1129(get_ancestry)
0.0418      0.0418   +<method 'update' of 'set' objects>
0.0480      0.0325   +bzrlib.btree_index:966(_multi_bisect_right)
0.0274      0.0274   +<method 'difference' of 'set' objects>
0.0081      0.0081   +<method 'add' of 'set' objects>
0.0075      0.0075   +<sorted>
0.0048      0.0004   +bzrlib.btree_index:899(_get_internal_nodes)
0.2275      0.0004   +bzrlib.btree_index:917(_get_leaf_nodes)
0.0002      0.0002   +<method 'extend' of 'list' objects>
0.0009      0.0001   +bzrlib.btree_index:1375(key_count)

So we have a bit of just general overhead (112ms), and then
50ms spent in _multi_bisect_right, which we could move to a C extension.
50ms in set.update and 28ms in set.difference
227ms in reading and parsing the 222 nodes from disk.
It seems a little unfortunate that parsing is the primary overhead,
but previous investigation did not reveal much fat that could be trimmed.

It is 3.8MB of uncompressed data that is being parsed. That's got to
take some amount of time. 200ms might be reasonable.
Which would hint that the only way to speed it up would be:
1) a different format
2) don't read the whole thing, stupid :)
Filename Latest Rev Last Changed Committer Comment Size
..
bzrlib 1185.1.29 19 years ago Robert Collins merge merge tweaks from aaron, which includes late Diff
contrib 1185.1.29 19 years ago Robert Collins merge merge tweaks from aaron, which includes late Diff
doc 1185.1.29 19 years ago Robert Collins merge merge tweaks from aaron, which includes late Diff
man1 2425.1.1 17 years ago Robert Collins ``make docs`` now creates a man page at ``man1/bzr Diff
tools 1185.1.29 19 years ago Robert Collins merge merge tweaks from aaron, which includes late Diff
.bzrignore 4580.5.3 15 years ago John Arbash Meinel Change the Makefile to stage things into a build d 1.2 KB Diff Download File
.rsyncexclude 1185.33.36 19 years ago Martin Pool Exclude more files from dumb-rsync upload 203 bytes Diff Download File
ancestry_test.py 4593.4.2 15 years ago John Arbash Meinel Removing the min(keys) and max(keys) calls saves 1 1.5 KB Diff Download File
BRANCH.TODO 4325.3.4 15 years ago Johan Walles Merge from upstream. 150 bytes Diff Download File
File bzr 4578.1.1 15 years ago John Arbash Meinel Update the breakin support to support CTRL-BREAK o 5.6 KB Diff Download File
bzr.ico 3688.3.3 16 years ago John Arbash Meinel An updated transparent icon for bzr. 12.7 KB Diff Download File
COPYING.txt 1861.2.9 18 years ago Alexander Belchenko rename gpl.txt => COPYING.txt 17.5 KB Diff Download File
INSTALL 2696.2.4 17 years ago Aaron Bentley Fix typo 1.4 KB Diff Download File
Makefile 4580.5.14 15 years ago John Arbash Meinel more updates to get things to build cleanly. 1) d 12.2 KB Diff Download File
NEWS 4593 15 years ago Canonical.com Patch Queue Manager (robertc) Partial overhaul of check to do less dup 368 KB Diff Download File
NOTES 4593.4.2 15 years ago John Arbash Meinel Removing the min(keys) and max(keys) calls saves 1 22.8 KB Diff Download File
profile_imports.py 4183.7.1 15 years ago Sabin Iacob update FSF mailing address 5.5 KB Diff Download File
README 3286 16 years ago Canonical.com Patch Queue Manager Start 1.4 development 3.3 KB Diff Download File
File setup.py 4584.1.2 15 years ago John Arbash Meinel Rework the setup.py a little bit, to support other 26.4 KB Diff Download File
TODO 2382.2.5 17 years ago Martin Pool Contents of TODO file moved into bug tracker 115 bytes Diff Download File