]> git.ipfire.org Git - thirdparty/git.git/commit
fetch: use oidset to keep the want OIDs for faster lookup
authorMasaya Suzuki <masayasuzuki@google.com>
Sun, 15 Sep 2019 21:18:02 +0000 (14:18 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 16 Sep 2019 20:02:50 +0000 (13:02 -0700)
commitb7e2d8bca5412db7b1bd3a711db3693ca6674dd2
tree03a27951b10722af9046532ce44d582337145aa9
parent5fa0f5238b0cd46cfe7f6fa76c3f526ea98148d9
fetch: use oidset to keep the want OIDs for faster lookup

During git-fetch, the client checks if the advertised tags' OIDs are
already in the fetch request's want OID set. This check is done in a
linear scan. For a repository that has a lot of refs, repeating this
scan takes 15+ minutes. In order to speed this up, create a oid_set for
other refs' OIDs.

Signed-off-by: Masaya Suzuki <masayasuzuki@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/fetch.c