Re: [RFC/PATCH v2] fetch: Speed up fetch by rewriting find_non_local_tags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 16 Sep 2009, Junio C Hamano wrote:

Julian Phillips <julian@xxxxxxxxxxxxxxxxx> writes:

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@xxxxxxxxxxxxxxxxx>
---

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?

The code you wrote ealier is almost the same as the string_list version, ~4.3s, so very marginally slower but a lot less code change. Personally I'd be happy with any of the three, so long as I don't have to wait 30s to find out that nothing's happened at $dayjob anymore ;)

--
Julian

 ---
QOTD:
	If it's too loud, you're too old.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]