From: Santi Béjar Date: Wed, 05 Nov 2008 09:38:31 GMT Subject: Slow "git rev-list origin/master --not --all" or "git fetch" slow when downloading nothing Message-ID: Hi *, In cold cache "git rev-list origin/master --not --all" is slow reading many files: cold cache: $ /usr/bin/time git rev-list origin/master --not --all 0.03user 0.02system 0:04.57elapsed 1%CPU (0avgtext+0avgdata 0maxresident)k 77848inputs+0outputs (410major+1798minor)pagefaults 0swaps hot cache: $ /usr/bin/time git rev-list origin/master --not --all 0.01user 0.00system 0:00.06elapsed 31%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (0major+2207minor)pagefaults 0swaps I think that, in this particular case (when the arguments are the tips of some of the branches), this should not read that many files. Moreover, this is used in "git fetch" (git rev-list --quiet --objects --not --all) to detect if all the objects are reachable from the local repository. When nothing has changed in the remote repository (so refs//* has all the remote refs) the "git fetch" could be almost instantaneous (even in coldcache), but currently it is not because of the above. Thanks, Santi