All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC/PATCH 0/2] Speed up fetch with large number of tags
@ 2009-09-16  7:53 Julian Phillips
  2009-09-16  7:53 ` [RFC/PATCH 1/2] ref-dict: Add a set of functions for working with a ref dictionary Julian Phillips
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Julian Phillips @ 2009-09-16  7:53 UTC (permalink / raw)
  To: git

I have a repository at $dayjob where fetch was taking ~30s to tell me
that there were no updates.

It turns out that I appear to have added a nasty linear search of all
remote refs for every commit (i.e. tag^{}) tag ref way back in the
original C implementation of fetch.  This doesn't scale well to large
numbers of refs, so this replaces it with a hash table based lookup
instead, which brings the time down to a few seconds even for very large
ref counts.

I haven't tested it with non-native transports, but there is no reason
to believe that the code should be transport specific.

Julian Phillips (2):
  ref-dict: Add a set of functions for working with a ref dictionary
  fetch: Speed up fetch by using ref dictionary

 Makefile        |    1 +
 builtin-fetch.c |   19 ++++++-------
 ref-dict.c      |   76 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 ref-dict.h      |   13 +++++++++
 4 files changed, 99 insertions(+), 10 deletions(-)
 create mode 100644 ref-dict.c
 create mode 100644 ref-dict.h

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

end of thread, other threads:[~2009-09-22 20:36 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-16  7:53 [RFC/PATCH 0/2] Speed up fetch with large number of tags Julian Phillips
2009-09-16  7:53 ` [RFC/PATCH 1/2] ref-dict: Add a set of functions for working with a ref dictionary Julian Phillips
2009-09-16  7:53 ` [RFC/PATCH 2/2] fetch: Speed up fetch by using " Julian Phillips
2009-09-16  9:44 ` [RFC/PATCH 0/2] Speed up fetch with large number of tags Junio C Hamano
2009-09-16 22:32   ` Julian Phillips
2009-09-16 22:42     ` Shawn O. Pearce
2009-09-16 22:52       ` Junio C Hamano
2009-09-16 23:03         ` Shawn O. Pearce
2009-09-16 23:19           ` Junio C Hamano
2009-09-16 22:53     ` [RFC/PATCH v2] fetch: Speed up fetch by rewriting find_non_local_tags Julian Phillips
2009-09-16 23:15       ` Junio C Hamano
2009-09-16 23:46         ` Julian Phillips
2009-09-17  1:30           ` Julian Phillips
2009-09-17  7:13             ` Johan Herland
2009-09-17  7:33               ` [RFC/PATCH v3] " Julian Phillips
2009-09-16 22:46   ` [RFC/PATCH 0/2] Speed up fetch with large number of tags Shawn O. Pearce
2009-09-22 20:36     ` Junio C Hamano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.