git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH 0/1] fetch: Cache the want OIDs for faster lookup
@ 2019-09-15 21:18 Masaya Suzuki
  2019-09-15 21:18 ` [PATCH 1/1] " Masaya Suzuki
  2019-09-16 20:01 ` [PATCH 0/1] " Junio C Hamano
  0 siblings, 2 replies; 6+ messages in thread
From: Masaya Suzuki @ 2019-09-15 21:18 UTC (permalink / raw)
  To: git; +Cc: Masaya Suzuki

When mirroring a repository with a lot of refs, there is a case where the client
takes a long time to calculate the want OIDs. This is observable with Chromium's
repository for example.

$ mkdir testing
$ cd testing
$ git init . --bare
$ git remote add origin master https://chromium.googlesource.com/chromium/src --mirror=fetch
$ git fetch origin

With the commands above, it takes a long time before sending a fetch request. I
stopped the command after 15 minutes.

Debugging this, it seems most of the time is spent on iterating the want refs to
see OIDs are included there. This patch speeds up this process by using oid_set.
Now the client can send a fetch request almost immediately.

Masaya Suzuki (1):
  fetch: Cache the want OIDs for faster lookup

 builtin/fetch.c | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

-- 
2.23.0.237.gc6a4ce50a0-goog


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-09-16 20:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-15 21:18 [PATCH 0/1] fetch: Cache the want OIDs for faster lookup Masaya Suzuki
2019-09-15 21:18 ` [PATCH 1/1] " Masaya Suzuki
2019-09-16  2:35   ` Derrick Stolee
2019-09-16  4:28     ` Masaya Suzuki
2019-09-16  4:34   ` Jeff King
2019-09-16 20:01 ` [PATCH 0/1] " Junio C Hamano

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).