Re: [PATCH] index-pack: avoid excessive re-reading of pack directory

2015-06-10 Thread Shawn Pearce
On Wed, Jun 10, 2015 at 7:00 AM, Jeff King wrote: > On Tue, Jun 09, 2015 at 08:46:24PM -0700, Shawn Pearce wrote: > >> > This patch introduces a "quick" flag to has_sha1_file which >> > callers can use when they would prefer high performance at >> > the cost of false negatives during repacks. Ther

Re: [PATCH] index-pack: avoid excessive re-reading of pack directory

2015-06-10 Thread Duy Nguyen
On Wed, Jun 10, 2015 at 9:00 PM, Jeff King wrote: > On Tue, Jun 09, 2015 at 08:46:24PM -0700, Shawn Pearce wrote: > >> > This patch introduces a "quick" flag to has_sha1_file which >> > callers can use when they would prefer high performance at >> > the cost of false negatives during repacks. Ther

Re: [PATCH] index-pack: avoid excessive re-reading of pack directory

2015-06-10 Thread Jeff King
On Tue, Jun 09, 2015 at 08:46:24PM -0700, Shawn Pearce wrote: > > This patch introduces a "quick" flag to has_sha1_file which > > callers can use when they would prefer high performance at > > the cost of false negatives during repacks. There may be > > other code paths that can use this, but the

Re: [PATCH] index-pack: avoid excessive re-reading of pack directory

2015-06-09 Thread Shawn Pearce
On Fri, Jun 5, 2015 at 5:29 AM, Jeff King wrote: > > However, some code paths make a large number of > has_sha1_file checks which are _not_ expected to return 1. > The collision test in index-pack.c is such a case. On a > local system, this can cause a performance slowdown of > around 5%. But on a

Re: [PATCH] index-pack: avoid excessive re-reading of pack directory

2015-06-09 Thread Jeff King
On Tue, Jun 09, 2015 at 01:24:36PM -0400, Jeff King wrote: > I tested this on my system, and confirmed that for a "git clone > --no-local --bare git.git": > > 1. It cuts the number of openat/getdents/close syscalls by several > orders of magnitude. > > 2. The overall time drops from ~11

Re: [PATCH] index-pack: avoid excessive re-reading of pack directory

2015-06-09 Thread Jeff King
On Fri, Jun 05, 2015 at 08:29:21AM -0400, Jeff King wrote: > On Fri, Jun 05, 2015 at 08:18:17AM -0400, Jeff King wrote: > > > 1. Devise some torture to tests to see whether my patch series is in > > fact racy on Linux. > > > > 2. Assuming it is, scrap it and make a has_sha1_file_quick()

[PATCH] index-pack: avoid excessive re-reading of pack directory

2015-06-05 Thread Jeff King
27;s entirely possible that I did something boneheaded that does not fix your problem. ;) Please test and confirm that it makes things better on your system. -- >8 -- Subject: [PATCH] index-pack: avoid excessive re-reading of pack directory Since 45e8a74 (has_sha1_file: re-check pack directory