-
Committer:
John Arbash Meinel
-
Date:
2011-03-18 11:51:58 UTC
-
mto:
This revision was merged to the branch mainline in
revision
5730.
-
Revision ID:
john@arbash-meinel.com-20110318115158-6s4xs41w01x3xcxv
Fix bug #737234. Preload all entries for iter_entries_by_dir().
None of the users of the api break out of the loop early. So if
the request made is going to touch all entries, then it is best
to just read them all in, and pre-populate all of the
InventoryEntries. Otherwise, ordering-by-directory was fairly
worst-case in large trees, because each directory would then
read all of its file-ids, which would hit most of the CHKMap,
but if it couldn't all be cached in memory, it would be
basically fully (re)read for every directory.
This drops reading gcc-linaro's full inventory from 4m30s to 11s
locally, and decreases the amount of data read from 8GB down to
128MB.