Re: [RFC/PATCH v2] fetch: Speed up fetch by rewriting find_non_local_tags
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 16, 2009, 23:15 UTC
- Message-ID
- <7veiq6wkfu.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20090916225350.45746.85139.julian@quantumfyre.co.uk>
Julian Phillips <julian@quantumfyre.co.uk> writes:
Show 14 quoted lines
> When trying to get a list of remote tags to see if we need to fetch
> any we were doing a linear search for the matching tag ref for the
> tag^{} commit entries. This proves to be incredibly slow for large
> numbers of tags. Rewrite the function so that we can do lookup in
> string_lists instead.
>
> For a repository with 50000 tags (and just a single commit on a single
> branch), a fetch that does nothing goes from ~ 1m50s to ~4.2s.
>
> Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk>
> ---
>
> Not only does this not require a custom hash table, it is also slightly
> faster than the last version (~4.2s vs ~4.5s).I am just curious. How would a "just one item lookbehind" code perform compared to this one?