]> arthur.barton.de Git - bup.git/commit
Combine and speed up idx->midx and bupindex merge
authorBrandon Low <lostlogic@lostlogicx.com>
Mon, 24 Jan 2011 03:31:51 +0000 (19:31 -0800)
committerAvery Pennarun <apenwarr@gmail.com>
Wed, 26 Jan 2011 03:58:47 +0000 (19:58 -0800)
commit54a850308fe0f07deed13fe095c326ff8ea23151
treea5fa34b740df1eb2e3d97321afc4226a7344ae9d
parent9aba6eec7740d9dea1bd503f0b85d63da164147f
Combine and speed up idx->midx and bupindex merge

These two processes used almost identical algorithms, but were
implemented separately.  The main difference was one was ascending and
the other was descending.

This patch reverses the cmp on index.Entry so that both can share an
algorithm.

It also cuts some overhead in the algorithm by using it.next() instead of
the next() wrapper, yielding a ~6% speedup on midx generation and index merging.

Signed-off-by: Brandon Low <lostlogic@lostlogicx.com>
cmd/index-cmd.py
lib/bup/git.py
lib/bup/helpers.py
lib/bup/index.py
lib/bup/t/tindex.py