-
Committer:
John Arbash Meinel
-
Date:
2009-09-21 18:36:04 UTC
-
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.)