Cache counter values, avoiding I/O when it doesn't change.
authorDavid James <davidjames@chromium.org>
Tue, 10 May 2011 04:11:47 +0000 (21:11 -0700)
committerZac Medico <zmedico@gentoo.org>
Tue, 10 May 2011 04:47:42 +0000 (21:47 -0700)
commit928bc527a8c3eab3784df54226df2f2d83c6c85c
tree78372e2d8c9c01fbe4050b87c1e35bf8c3e995b3
parent57b3d395aa582e798f008240ebd635fd0f269bed
Cache counter values, avoiding I/O when it doesn't change.

This improves merge times by up to 25%, since looping over the vardb for
each package install is slow.

TEST=Emerge a bunch of packages, notice 25% speed improvement.
BUG=chromium-os:15112

Change-Id: I51dd617219cd1820ceeb702291bd790990995be4
pym/portage/dbapi/_MergeProcess.py
pym/portage/dbapi/vartree.py