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>
Thu, 12 May 2011 05:19:19 +0000 (22:19 -0700)
commite0b4f2971245506750cb013a4fda8251111e1c46
treeda19ccf8f836405d587781f4e12f7895a08406d4
parent32c4d1d7f05b8ab10a97a5ef965be14a8dd7e10b
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/vartree.py