diff options
author | Nicolas Pitre <nico@cam.org> | 2007-05-30 22:48:13 -0400 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-05-30 23:35:07 -0700 |
commit | f7c22cc68ccba0cb5bbd43177507795c48afb1f5 (patch) | |
tree | 4b6ad9c7c2714fd17753f626816ec2d672e1dc91 /git-gui/lib/merge.tcl | |
parent | Makefile: Use generic rule to build test programs (diff) | |
download | tgif-f7c22cc68ccba0cb5bbd43177507795c48afb1f5.tar.xz |
always start looking up objects in the last used pack first
Jon Smirl said:
| Once an object reference hits a pack file it is very likely that
| following references will hit the same pack file. So first place to
| look for an object is the same place the previous object was found.
This is indeed a good heuristic so here it is. The search always start
with the pack where the last object lookup succeeded. If the wanted
object is not available there then the search continues with the normal
pack ordering.
To test this I split the Linux repository into 66 packs and performed a
"time git-rev-list --objects --all > /dev/null". Best results are as
follows:
Pack Sort w/o this patch w/ this patch
-------------------------------------------------------------
recent objects last 26.4s 20.9s
recent objects first 24.9s 18.4s
This shows that the pack order based on object age has some influence,
but that the last-used-pack heuristic is even more significant in
reducing object lookup.
Signed-off-by: Nicolas Pitre <nico@cam.org> --- Note: the
--max-pack-size to git-repack currently produces packs with old objects
after those containing recent objects. The pack sort based on
filesystem timestamp is therefore backward for those. This needs to be
fixed of course, but at least it made me think about this variable for
the test.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-gui/lib/merge.tcl')
0 files changed, 0 insertions, 0 deletions