{"thread":{"id":"40883","subject":"Git super slow on Windows 7","startedAt":"2015-11-25T12:35:57Z","lastAt":"2015-11-25T20:42:06Z","messageCount":5,"participants":["Lars Schneider","Stefan Beller","Duy Nguyen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"273729","messageId":"EEA07A84-26D8-4709-97AC-2C4F3A0CC5BD@gmail.com","threadId":"40883","inReplyTo":null,"subject":"Git super slow on Windows 7","fromName":"Lars Schneider","fromEmail":"larsxschneider@gmail.com","sentAt":"2015-11-25T12:35:57Z","receivedAt":"2015-11-25T12:35:57Z","isPatch":false,"sender":{"key":"larsxschneider@gmail.com","avatar":"https://avatars.githubusercontent.com/u/477434?v=4"},"body":"Hi Johannes,\n\nI am working with Git for Windows right now and it is dramatically slower than on OS X.\nI executed \"time git status\" on Windows and OS X with the same repository and the following results:\n\n## Windows git version 2.6.3.windows.1 (with enabled experimental flag on install):\nreal    0m1.327s\nuser    0m0.000s\nsys     0m0.015s\n\n\n## OS X git version 2.4.9 (Apple Git-60):\ngit status  0.06s user 0.13s system 102% cpu 0.186 total\n\n\nInitially it was even slower on Windows (~1.6s). According to [1] I used the following settings to make it faster:\n$ git config --global core.preloadindex true\n$ git config --global core.fscache true\n\nIs this behavior normal/expected?\nIf it is not normal, how would you debug the issue? How can I find out why it is so slow?\n\nMy user drive is not on a net share and the machine has a SSD.\n\nThanks,\nLars\n\n\n[1] http://stackoverflow.com/questions/4485059/git-bash-is-extremely-slow-in-windows-7-x64"},{"id":"273749","messageId":"0B47434E-00FE-463A-95F1-1F10537C9F7A@gmail.com","threadId":"40883","inReplyTo":"EEA07A84-26D8-4709-97AC-2C4F3A0CC5BD@gmail.com","subject":"Re: Git super slow on Windows 7","fromName":"Lars Schneider","fromEmail":"larsxschneider@gmail.com","sentAt":"2015-11-25T18:42:13Z","receivedAt":"2015-11-25T18:42:13Z","isPatch":false,"sender":{"key":"larsxschneider@gmail.com","avatar":"https://avatars.githubusercontent.com/u/477434?v=4"},"body":"After some investigation I figured that ~50 Submodules are the culprit.\nDoes anyone have an idea how to speed up Git on Windows while keeping 50 Submodules?\n\nThanks,\nLars\n\n\n> On 25 Nov 2015, at 13:35, Lars Schneider <larsxschneider@gmail.com> wrote:\n> \n> Hi Johannes,\n> \n> I am working with Git for Windows right now and it is dramatically slower than on OS X.\n> I executed \"time git status\" on Windows and OS X with the same repository and the following results:\n> \n> ## Windows git version 2.6.3.windows.1 (with enabled experimental flag on install):\n> real    0m1.327s\n> user    0m0.000s\n> sys     0m0.015s\n> \n> \n> ## OS X git version 2.4.9 (Apple Git-60):\n> git status  0.06s user 0.13s system 102% cpu 0.186 total\n> \n> \n> Initially it was even slower on Windows (~1.6s). According to [1] I used the following settings to make it faster:\n> $ git config --global core.preloadindex true\n> $ git config --global core.fscache true\n> \n> Is this behavior normal/expected?\n> If it is not normal, how would you debug the issue? How can I find out why it is so slow?\n> \n> My user drive is not on a net share and the machine has a SSD.\n> \n> Thanks,\n> Lars\n> \n> \n> [1] http://stackoverflow.com/questions/4485059/git-bash-is-extremely-slow-in-windows-7-x64\n"},{"id":"273751","messageId":"CAGZ79kZQd4JrQsp6sk8x-OAWMxxbF+a8BXZb1VQSdJeiQ8jhuQ@mail.gmail.com","threadId":"40883","inReplyTo":"0B47434E-00FE-463A-95F1-1F10537C9F7A@gmail.com","subject":"Re: Git super slow on Windows 7","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2015-11-25T18:47:05Z","receivedAt":"2015-11-25T18:47:05Z","isPatch":false,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"On Wed, Nov 25, 2015 at 10:42 AM, Lars Schneider\n<larsxschneider@gmail.com> wrote:\n> After some investigation I figured that ~50 Submodules are the culprit.\n> Does anyone have an idea how to speed up Git on Windows while keeping 50 Submodules?\n>\n> Thanks,\n> Lars\n>\n>\n\nUse the latest version of Git ;)\n\nCheckout the series merged at 65e1449\n(2015-10-05, Merge branch 'sb/submodule-helper')\n\n    The infrastructure to rewrite \"git submodule\" in C is being built\n    incrementally.  Let's polish these early parts well enough and make\n    them graduate to 'next' and 'master', so that the more involved\n    follow-up can start cooking on a solid ground.\n\n    * sb/submodule-helper:\n      submodule: rewrite `module_clone` shell function in C\n      submodule: rewrite `module_name` shell function in C\n      submodule: rewrite `module_list` shell function in C\n\nMore specifically the commits in there:\n\nsubmodule: rewrite `module_name` shell function in C\n\n    This implements the helper `name` in C instead of shell,\n    yielding a nice performance boost.\n\n    Before this patch, I measured a time (best out of three):\n\n      $ time ./t7400-submodule-basic.sh  >/dev/null\n        real 0m11.066s\n        user 0m3.348s\n        sys 0m8.534s\n\n    With this patch applied I measured (also best out of three)\n\n      $ time ./t7400-submodule-basic.sh  >/dev/null\n        real 0m10.063s\n        user 0m3.044s\n        sys 0m7.487s\n"},{"id":"273762","messageId":"CACsJy8Becrc57+56BCLSq8Pd9p5m2qpERqXwY2AN21H=BfADNA@mail.gmail.com","threadId":"40883","inReplyTo":"CAGZ79kZQd4JrQsp6sk8x-OAWMxxbF+a8BXZb1VQSdJeiQ8jhuQ@mail.gmail.com","subject":"Re: Git super slow on Windows 7","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2015-11-25T20:23:46Z","receivedAt":"2015-11-25T20:23:46Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Wed, Nov 25, 2015 at 7:47 PM, Stefan Beller <sbeller@google.com> wrote:\n> On Wed, Nov 25, 2015 at 10:42 AM, Lars Schneider\n> <larsxschneider@gmail.com> wrote:\n>> After some investigation I figured that ~50 Submodules are the culprit.\n>> Does anyone have an idea how to speed up Git on Windows while keeping 50 Submodules?\n>>\n>> Thanks,\n>> Lars\n>>\n>>\n>\n> Use the latest version of Git ;)\n\nDoes it do parallel refresh yet? I think it would help.  I only looked\nat \"git log --merges origin/pu\" and nothing caught my eyes.\n-- \nDuy\n"},{"id":"273764","messageId":"CAGZ79kYUor3Hx+ggaDvkc8MSH+nMtZrgGXRvgLz2qqHZmy5tCg@mail.gmail.com","threadId":"40883","inReplyTo":"CACsJy8Becrc57+56BCLSq8Pd9p5m2qpERqXwY2AN21H=BfADNA@mail.gmail.com","subject":"Re: Git super slow on Windows 7","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2015-11-25T20:42:06Z","receivedAt":"2015-11-25T20:42:06Z","isPatch":false,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"On Wed, Nov 25, 2015 at 12:23 PM, Duy Nguyen <pclouds@gmail.com> wrote:\n> On Wed, Nov 25, 2015 at 7:47 PM, Stefan Beller <sbeller@google.com> wrote:\n>> On Wed, Nov 25, 2015 at 10:42 AM, Lars Schneider\n>> <larsxschneider@gmail.com> wrote:\n>>> After some investigation I figured that ~50 Submodules are the culprit.\n>>> Does anyone have an idea how to speed up Git on Windows while keeping 50 Submodules?\n>>>\n>>> Thanks,\n>>> Lars\n>>>\n>>>\n>>\n>> Use the latest version of Git ;)\n>\n> Does it do parallel refresh yet? I think it would help.  I only looked\n> at \"git log --merges origin/pu\" and nothing caught my eyes.\n\nNo. The hinted patch series only does a partial shell->C conversion, which\nis the best guess for improving git status here.\n\nI punted on parallel local operations inside \"git submodule update\" for now, too\nas when things go wrong there, you need a human to resolve the merge conflict,\nand as a user you only want to deal with one merge conflict at a time instead of\nbeing left there with a ton of unresolved issues (according to the git\nlog of older\npatches in the submodule area).\n\ngit status should require not human interaction if things go bad\nwithin submodules,\nso we may want to speed that up by parallelizing the submodule part. The status\ncommand gathers all information of submodules by a call to \"git\nsubmodule summary\"\nand does some slight post processing on the output. \"git submodule\nsummary\" however\nis written completely in shell code (200 lines, so I estimate 400 lines of C).\n\nI will benchmark that later today and check if it's worth for us to\nrewrite that in C for\nour case (we plan to have lots more submodules, but we're a linux shop)\n"}]}