~bzr-pqm/bzr/bzr.dev

Viewing all changes in revision 4708.1.1.

  • Committer: John Arbash Meinel
  • Date: 2009-09-21 18:36:04 UTC
  • mto: This revision was merged to the branch mainline in revision 4709.
  • Revision ID: john@arbash-meinel.com-20090921183604-p1g8svzkwklc9bsw
Use a cStringIO.StringIO for 1-page btree indexes.

bzr-search creates a *lot* of tiny indices (on a big project, it isn't uncommon
to have 200k indices.)
This means we generate 2 temp files for every index, which is overkill.
Changing it to use a StringIO while we have <= 1 page ends up being a big win.
Indexing just 'bzr-search' itself drops from 4.3s => 1.0s on Windows.
(Especially since temp files are more expensive here.)

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: