Re: [PATCH] fetch: use "quick" has_sha1_file for tag following

2016-10-18 Thread Jeff King
On Mon, Oct 17, 2016 at 10:30:28AM -0700, Junio C Hamano wrote: > > It looks like I _did_ look into optimizing this into a single stat() > > call in the thread at [1]. I completely forgot about that. I did find > > there that naively using stat_validity() on a directory is racy, though > > I wonde

Re: [PATCH] fetch: use "quick" has_sha1_file for tag following

2016-10-17 Thread Junio C Hamano
Jeff King writes: > Still an impressive speedup as a percentage, but negligible in absolute > terms. But that's on a local filesystem on a Linux machine. I'd worry > much more about a system with a slow readdir(), e.g., due to NFS. > Somebody's real-world NFS case[1] was what prompted us to do 0e

Re: [PATCH] fetch: use "quick" has_sha1_file for tag following

2016-10-14 Thread Jeff King
On Fri, Oct 14, 2016 at 10:39:52AM -0700, Junio C Hamano wrote: > Jeff King writes: > > > So it's certainly better. But 7500 packs is just silly, and squeezing > > out ~400ms there is hardly worth it. If you repack this same case into a > > single pack, the command drops to 5ms. So yes, there's

Re: [PATCH] fetch: use "quick" has_sha1_file for tag following

2016-10-14 Thread Junio C Hamano
Jeff King writes: > So it's certainly better. But 7500 packs is just silly, and squeezing > out ~400ms there is hardly worth it. If you repack this same case into a > single pack, the command drops to 5ms. So yes, there's close to an order > of magnitude speedup here, but you get that _and_ anoth

Re: [PATCH] fetch: use "quick" has_sha1_file for tag following

2016-10-13 Thread Jeff King
On Thu, Oct 13, 2016 at 01:04:43PM -0400, Jeff King wrote: > > This patch teaches fetch to use HAS_SHA1_QUICK to sacrifice > > accuracy for speed, in cases where we might be racy with a > > simultaneous repack. This is similar to the fix in 0eeb077 > > (index-pack: avoid excessive re-reading of pa

Re: [PATCH] fetch: use "quick" has_sha1_file for tag following

2016-10-13 Thread Jeff King
On Thu, Oct 13, 2016 at 12:53:44PM -0400, Jeff King wrote: > -- >8 -- > Subject: [PATCH] fetch: use "quick" has_sha1_file for tag following A few comments on my own patch... > This patch teaches fetch to use HAS_SHA1_QUICK to sacrifice > accuracy for speed, in cases wh

[PATCH] fetch: use "quick" has_sha1_file for tag following

2016-10-13 Thread Jeff King
d up with a commit message. Note that I converted one more call site to the "quick" form; it would trigger when the candidate tags are real tag objects, not just pointers to commits. That might improve your runtime more, depending on what is actually in your repository. -- >8 -- Subject: