<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style></head><body lang=EN-US link=blue vlink="#954F72"><div class=WordSection1><p class=MsoNormal>Hi Simon,</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I think the two issues might be related. From what I can tell magit invokes some msys utilies at startup such as cygdrive to normalize paths <a href="https://github.com/magit/magit/issues/2284">https://github.com/magit/magit/issues/2284</a> . The msys AD issue would affect all of these tools and so each of them would be quite slow to run.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I would indeed try the AD fix first and see how the rest behave.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>This issue is well documented at the Cygwin FAQ as well <a href="https://cygwin.com/faq/faq.html#faq.using.startup-slow">https://cygwin.com/faq/faq.html#faq.using.startup-slow</a> if you’re interested in what’s </p><p class=MsoNormal>Going on. Basically what it’s saying is that you can cache your user information (username etc) locally instead of having it query the server everytime.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>If this doesn’t solve the magit problem as well, then try issuing a normal git command, if that’s slow as well then run strace on it and it should give</p><p class=MsoNormal>You an idea of what’s taking so long.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Kind Regards,</p><p class=MsoNormal>Tamar</p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman",serif'><o:p> </o:p></span></p><div style='mso-element:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal style='border:none;padding:0in'><b>From: </b><a href="mailto:ghc-devs@haskell.org">Simon Peyton Jones via ghc-devs</a><br><b>Sent: </b>Tuesday, June 28, 2016 16:00<br><b>To: </b><a href="mailto:stegeman@gmail.com">Luite Stegeman</a>; <a href="mailto:david.macek.0@gmail.com">David Macek</a>; <a href="mailto:tamar@zhox.com">tamar@zhox.com</a>; <a href="mailto:johnw@newartisans.com">John Wiegley</a><br><b>Cc: </b><a href="mailto:ghc-devs@haskell.org">ghc-devs@haskell.org</a><br><b>Subject: </b>RE: msys2 64 bit: help help!</p></div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman",serif'><o:p> </o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:6.0pt;margin-right:0in;margin-bottom:12.0pt;margin-left:0in'><span lang=EN-GB>Have you tried specifying an absolute path for the git executable that magit uses, to avoid the overhead of traversing the environment for each call? (M-x customize-var RET magit-git-executable RET) </span><span lang=EN-GB><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>I’m pretty sure it’s not that, because in the task manager I see stuck ‘git.exe’ consuming zero cycles with a child process of ‘comhost’ (I think).   Then it completes and another one is born.   But I’ll give it a try anyway, thanks<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB>I’m still utterly baffled about why emacs is invoking git when I simply open a file (Ctrl-X f).<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB>Simon<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p> </o:p></span></p><div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b>From:</b> Luite Stegeman [mailto:stegeman@gmail.com] <br><b>Sent:</b> 28 June 2016 14:09<br><b>To:</b> Simon Peyton Jones <simonpj@microsoft.com>; David Macek <david.macek.0@gmail.com>; tamar@zhox.com; John Wiegley <johnw@newartisans.com><br><b>Cc:</b> ghc-devs@haskell.org<br><b>Subject:</b> Re: msys2 64 bit: help help!<o:p></o:p></p></div></div><p class=MsoNormal><span lang=EN-GB style='font-family:"Times New Roman",serif'><o:p> </o:p></span></p><div><p class=MsoNormal style='mso-margin-top-alt:6.0pt;margin-right:0in;margin-bottom:12.0pt;margin-left:0in'><span lang=EN-GB>Have you tried specifying an absolute path for the git executable that magit uses, to avoid the overhead of traversing the environment for each call? (M-x customize-var RET magit-git-executable RET) <o:p></o:p></span></p><div><div><p class=MsoNormal style='mso-margin-top-alt:6.0pt;margin-right:0in;margin-bottom:6.0pt;margin-left:0in'><span lang=EN-GB>On Tue, Jun 28, 2016 at 2:51 PM Simon Peyton Jones via ghc-devs <<a href="mailto:ghc-devs@haskell.org">ghc-devs@haskell.org</a>> wrote:<o:p></o:p></span></p></div></div></div></div><p class=MsoNormal style='mso-margin-top-alt:6.0pt;margin-right:0in;margin-bottom:6.0pt;margin-left:4.8pt'><span lang=EN-GB>David, Tamar<br><br>I have another issue.  I'm using 'magit' (in emacs) to drive git.  But it gives half-minute delays to do anything at all.  There are lots of people complaining about it (googlable) but no solutions I can see.  Do I have to give up magit?<br><br>It used to be fine in earlier versions.<br><br>Just at the moment it's Much Much More Serious.  Even opening a file in emacs (nothing to do with git or (ostensibly) magit, takes nearly a minute!!  In the process manager I can see lots of git activity -- just when I open a file in ordinary emacs!<br><br>I have utterly no idea why this might be.  I'm adding John Wiegley, my Emacs Friend<br><br>Thanks<br><br>Simon<br><br>|  -----Original Message-----<br>|  From: David Macek [mailto:<a href="mailto:david.macek.0@gmail.com" target="_blank">david.macek.0@gmail.com</a>]<br>|  Sent: 28 June 2016 13:20<br>|  To: Simon Peyton Jones <<a href="mailto:simonpj@microsoft.com" target="_blank">simonpj@microsoft.com</a>>; <a href="mailto:tamar@zhox.com" target="_blank">tamar@zhox.com</a><br>|  Cc: <a href="mailto:ghc-devs@haskell.org" target="_blank">ghc-devs@haskell.org</a><br>|  Subject: Re: msys2 64 bit: help help!<br>|<br>|  On 27. 6. 2016 23:33, Simon Peyton Jones via ghc-devs wrote:<br>|  > 1.  I just left the machine for 10-15 mins and lo! the shell windows<br>|  opened up. It just took a loooong time.<br>|<br>|  I could be something with Active Directory. Cygwin (upon which is<br>|  MSYS2 based) integrates with AD, but there are numerous (google-able)<br>|  reports of huge slowdowns related to this.<br>|<br>|  > At this point, starting a new shell no longer took a long time.  It<br>|  all seemed to be working.<br>|<br>|  Also don't forget to exclude `C:\msys64` from any anti-virus scans.<br>|<br>|<br>|  > 2.  I then ran pacman -Syuu as instructed on the installation page:<br>|  <a href="https://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fsourceforge.net%2fp%2fmsys2%2fwiki%2fMSYS2%2520installation%2f&data=01%7c01%7csimonpj%40064d.mgd.microsoft.com%7c031c5d465f0b4cc6a15308d39f55747e%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=goH1Vv4K8YPMneu383XT0gMLIxFlDQLbYAxvAElHb9U%3d" target="_blank">https://sourceforge.net/p/msys2/wiki/MSYS2%20installation/</a><br>|<br>|  I'm afraid you misread the instructions. You should run `update-core`<br>|  first to upgrade to the newer pacman that handles `pacman -Syuu`<br>|  correctly. (New installer packages with an up-to-date pacman are<br>|  planned.)<br>|<br>|  > The log of what happened is below.  There are numerous failures<br>|  involving Cygwin, which I do not have installed, at least not so far<br>|  as I know.   I do not know if these failures matter.<br>|<br>|  They might. See below.<br>|<br>|  > 3. After this step, starting a shell failed altogether with<br>|  "c:/msys64/mingw64_shell.bat is not recognised as an internal or<br>|  external command". And sure enough, there is no such file. Presumably<br>|  it existed in step 1.  So perhaps step 2 deleted it?<br>|<br>|  If the post-install script for `filesystem` were able to run, it would<br>|  inform you that `*_shell.bat` are deprecated and were removed. I see<br>|  you have `msys2-launcher-git` installed -- you can then use<br>|  `C:\msys64\mingw64.exe` (and even pin it to the taskbar).<br>|<br>|  > 4. As you mention, I then tried msys2_shell.cmd.  It worked -- with<br>|  a noticeable delay of 5 seconds or so.<br>|<br>|  May still be AD-related.<br>|<br>|  > * should I worry about all those install errs<br>|<br>|  I recommend staying on the safe side and nuke the installation.<br>|  Alternatively, reinstall the packages that had failures (`pacman -S<br>|  gcc-libs gettext gmp ...`).<br>|<br>|  > * how can I debug what's happening with<br>|  >   that long delay<br>|<br>|  `/etc/nsswitch.conf` allows for some configuration. See<br>|  <<a href="https://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fcygwin.com%2fcygwin-ug-net%2fntsec.html%23ntsec-mapping-nsswitch-&data=01%7c01%7csimonpj%40064d.mgd.microsoft.com%7c031c5d465f0b4cc6a15308d39f55747e%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=T06REWRJ10FSJOFladyWuqJi68RJCv0TzpBo0GjhopE%3d" target="_blank">https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-mapping-nsswitch-</a><br>|  pwdgrp>.<br>|<br>|  > * Should I nuke the start menu shortcuts that<br>|  >   the msys64 installer so carefully installed<br>|  >   in favour of msys2_shell.cmd?<br>|<br>|  Yes or see above. Note that you might need `msys2_shell.cmd -mingw64`<br>|  instead (not sure if it matters for GHC).<br>|<br>|  --<br>|  David Macek<br><br>_______________________________________________<br>ghc-devs mailing list<br><a href="mailto:ghc-devs@haskell.org" target="_blank">ghc-devs@haskell.org</a><br><a href="https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fmail.haskell.org%2fcgi-bin%2fmailman%2flistinfo%2fghc-devs&data=01%7c01%7csimonpj%40064d.mgd.microsoft.com%7c031c5d465f0b4cc6a15308d39f55747e%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=EAFOQ%2bLrZSRJxiJrUi69PUeNAt690sXHR55t%2fLFKdYk%3d" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs</a><o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Times New Roman",serif'><o:p> </o:p></span></p></div></body></html>