Re: 'git status' on NFS performance regression in 1.7.0
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 17, 2010, 20:23 UTC
- Message-ID
- <7vy6irligs.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <885649361002171208j41405b9exdfc34034c905e96c@mail.gmail.com>
James Pickens <jepicken@gmail.com> writes:
Show 5 quoted lines
> I noticed that 'git status' in version 1.7.0 is much slower than in 1.6.2.5 > on large work trees on NFS - averaging ~13 seconds runtime vs. ~2 seconds. > I did a bit of debugging and found that 'git status' apparently doesn't use > the multi-threaded preload_index any more, although some other commands > like diff still use it. Was it intentionally dropped from 'git status'?
There might be subtle breakage for doing this, but it would be worth a try ;-)
builtin-commit.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/builtin-commit.c b/builtin-commit.c index 55676fd..71f81c9 100644 --- a/builtin-commit.c +++ b/builtin-commit.c @@ -1046,7 +1046,7 @@ int cmd_status(int argc, const char **argv, const char *prefix) if (*argv) s.pathspec = get_pathspec(prefix, argv); - read_cache(); + read_cache_preload(NULL); refresh_index(&the_index, REFRESH_QUIET|REFRESH_UNMERGED, s.pathspec, NULL, NULL); s.is_initial = get_sha1(s.reference, sha1) ? 1 : 0; s.in_merge = in_merge;