{"thread":{"id":"22698","subject":"'git status' on NFS performance regression in 1.7.0","startedAt":"2010-02-17T20:08:12Z","lastAt":"2010-02-18T08:46:31Z","messageCount":6,"participants":["James Pickens","Junio C Hamano","Peter Krefting"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"134888","messageId":"885649361002171208j41405b9exdfc34034c905e96c@mail.gmail.com","threadId":"22698","inReplyTo":null,"subject":"'git status' on NFS performance regression in 1.7.0","fromName":"James Pickens","fromEmail":"jepicken@gmail.com","sentAt":"2010-02-17T20:08:12Z","receivedAt":"2010-02-17T20:08:12Z","isPatch":false,"sender":{"key":"jepicken@gmail.com","avatar":null},"body":"Hi,\n\nI noticed that 'git status' in version 1.7.0 is much slower than in 1.6.2.5\non large work trees on NFS - averaging ~13 seconds runtime vs. ~2 seconds.\nI did a bit of debugging and found that 'git status' apparently doesn't use\nthe multi-threaded preload_index any more, although some other commands\nlike diff still use it.  Was it intentionally dropped from 'git status'?\n\nJames\n"},{"id":"134889","messageId":"7v3a0zmx2e.fsf@alter.siamese.dyndns.org","threadId":"22698","inReplyTo":"885649361002171208j41405b9exdfc34034c905e96c@mail.gmail.com","subject":"Re: 'git status' on NFS performance regression in 1.7.0","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-02-17T20:22:49Z","receivedAt":"2010-02-17T20:22:49Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"James Pickens <jepicken@gmail.com> writes:\n\n> I noticed that 'git status' in version 1.7.0 is much slower than in 1.6.2.5\n> on large work trees on NFS - averaging ~13 seconds runtime vs. ~2 seconds.\n> I did a bit of debugging and found that 'git status' apparently doesn't use\n> the multi-threaded preload_index any more, although some other commands\n> like diff still use it.  Was it intentionally dropped from 'git status'?\n\nThere might be subtle breakage for doing this, but it would be worth a try\n;-)\n\n builtin-commit.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/builtin-commit.c b/builtin-commit.c\nindex 55676fd..71f81c9 100644\n--- a/builtin-commit.c\n+++ b/builtin-commit.c\n@@ -1046,7 +1046,7 @@ int cmd_status(int argc, const char **argv, const char *prefix)\n \tif (*argv)\n \t\ts.pathspec = get_pathspec(prefix, argv);\n \n-\tread_cache();\n+\tread_cache_preload();\n \trefresh_index(&the_index, REFRESH_QUIET|REFRESH_UNMERGED, s.pathspec, NULL, NULL);\n \ts.is_initial = get_sha1(s.reference, sha1) ? 1 : 0;\n \ts.in_merge = in_merge;\n"},{"id":"134890","messageId":"7vy6irligs.fsf@alter.siamese.dyndns.org","threadId":"22698","inReplyTo":"885649361002171208j41405b9exdfc34034c905e96c@mail.gmail.com","subject":"Re: 'git status' on NFS performance regression in 1.7.0","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-02-17T20:23:31Z","receivedAt":"2010-02-17T20:23:31Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"James Pickens <jepicken@gmail.com> writes:\n\n> I noticed that 'git status' in version 1.7.0 is much slower than in 1.6.2.5\n> on large work trees on NFS - averaging ~13 seconds runtime vs. ~2 seconds.\n> I did a bit of debugging and found that 'git status' apparently doesn't use\n> the multi-threaded preload_index any more, although some other commands\n> like diff still use it.  Was it intentionally dropped from 'git status'?\n\nThere might be subtle breakage for doing this, but it would be worth a try\n;-)\n\n builtin-commit.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/builtin-commit.c b/builtin-commit.c\nindex 55676fd..71f81c9 100644\n--- a/builtin-commit.c\n+++ b/builtin-commit.c\n@@ -1046,7 +1046,7 @@ int cmd_status(int argc, const char **argv, const char *prefix)\n \tif (*argv)\n \t\ts.pathspec = get_pathspec(prefix, argv);\n \n-\tread_cache();\n+\tread_cache_preload(NULL);\n \trefresh_index(&the_index, REFRESH_QUIET|REFRESH_UNMERGED, s.pathspec, NULL, NULL);\n \ts.is_initial = get_sha1(s.reference, sha1) ? 1 : 0;\n \ts.in_merge = in_merge;\n"},{"id":"134894","messageId":"885649361002171335r74295d34l9a5ed9557059dbc6@mail.gmail.com","threadId":"22698","inReplyTo":"7vy6irligs.fsf@alter.siamese.dyndns.org","subject":"Re: 'git status' on NFS performance regression in 1.7.0","fromName":"James Pickens","fromEmail":"jepicken@gmail.com","sentAt":"2010-02-17T21:35:06Z","receivedAt":"2010-02-17T21:35:06Z","isPatch":false,"sender":{"key":"jepicken@gmail.com","avatar":null},"body":"On Wed, Feb 17, 2010, Junio C Hamano <gitster@pobox.com> wrote:\n> There might be subtle breakage for doing this, but it would be worth a try\n> ;-)\n\nThanks, with that patch Git 1.7.0 is faster than 1.6.2.5 - ~2 seconds\naverage runtime vs. ~3 seconds (1.6.2.5 got slower since my original test\nlast night; must be more network and/or file server traffic right now).\n\nI'm not sure how to interpret the \"subtle breakage\" comment with the\nwinking smiley.  Do you mean that preload_index in 1.7.0 is not well tested\nand may be broken?  FWIW, I didn't notice any breakage, but I didn't do\nmuch testing.\n\nJames\n"},{"id":"134896","messageId":"7vbpfncyer.fsf@alter.siamese.dyndns.org","threadId":"22698","inReplyTo":"885649361002171335r74295d34l9a5ed9557059dbc6@mail.gmail.com","subject":"Re: 'git status' on NFS performance regression in 1.7.0","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-02-17T22:03:56Z","receivedAt":"2010-02-17T22:03:56Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"James Pickens <jepicken@gmail.com> writes:\n\n> I'm not sure how to interpret the \"subtle breakage\" comment with the\n> winking smiley.  Do you mean that preload_index in 1.7.0 is not well tested\n> and may be broken?  FWIW, I didn't notice any breakage, but I didn't do\n> much testing.\n\nThe new \"status\" codepath is different from \"commit --dry-run\" codepath\nthat was used by \"git status\" in 1.6.6 series.  This old codepath has been\nused extensibly with preloaded index and is continued to be used when you\nrun \"git commit\" with various options.  It is not preload-index that could\nbe subtly broken.\n\nHowever, nobody used the new \"status\" codepath with preloaded index, and I\nhaven't thought things through if anything we are doing in that codepath\nis incompatible with preloaded index in some way.\n\nBy the way, the argument to read_cache_preload() should be s.pathspec, not\nNULL, I think.\n\nThanks.\n"},{"id":"134934","messageId":"alpine.DEB.2.00.1002180943240.11095@ds9.cixit.se","threadId":"22698","inReplyTo":"885649361002171208j41405b9exdfc34034c905e96c@mail.gmail.com","subject":"Re: 'git status' on NFS performance regression in 1.7.0","fromName":"Peter Krefting","fromEmail":"peter@softwolves.pp.se","sentAt":"2010-02-18T08:46:31Z","receivedAt":"2010-02-18T08:46:31Z","isPatch":false,"sender":{"key":"peter@softwolves.pp.se","avatar":"https://avatars.githubusercontent.com/u/990764?v=4"},"body":"James Pickens:\n\n> I noticed that 'git status' in version 1.7.0 is much slower than in \n> 1.6.2.5 on large work trees on NFS - averaging ~13 seconds runtime vs. ~2 \n> seconds.\n\nThis applies to local disk as well. Where it used to be almost \ninstantaneous, I now see a wait of about three seconds on a checkout of \nabout 8,000 files.\n\n-- \n\\\\// Peter - http://www.softwolves.pp.se/\n"}]}