Hi Simon,
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 https://github.com/magit/magit/issues/2284 . The msys AD issue would affect all of these tools and so each of them would be quite slow to run.
I would indeed try the AD fix first and see how the rest behave.
This issue is well documented at the Cygwin FAQ as well https://cygwin.com/faq/faq.html#faq.using.startup-slow if you’re interested in what’s
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.
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
You an idea of what’s taking so long.
Kind Regards,
Tamar
From: Simon Peyton Jones via ghc-devs
Sent: Tuesday, June 28, 2016 16:00
To: Luite Stegeman; David Macek; tamar@zhox.com; John Wiegley
Cc: ghc-devs@haskell.org
Subject: RE: msys2 64 bit: help help!
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)
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
I’m still utterly baffled about why emacs is invoking git when I simply open a file (Ctrl-X f).
Simon
From: Luite Stegeman [mailto:stegeman@gmail.com]
Sent: 28 June 2016 14:09
To: Simon Peyton Jones <simonpj@microsoft.com>; David Macek <david.macek.0@gmail.com>; tamar@zhox.com; John Wiegley <johnw@newartisans.com>
Cc: ghc-devs@haskell.org
Subject: Re: msys2 64 bit: help help!
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)
On Tue, Jun 28, 2016 at 2:51 PM Simon Peyton Jones via ghc-devs <ghc-devs@haskell.org> wrote:
David, Tamar
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?
It used to be fine in earlier versions.
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!
I have utterly no idea why this might be. I'm adding John Wiegley, my Emacs Friend
Thanks
Simon
| -----Original Message-----
| From: David Macek [mailto:david.macek.0@gmail.com]
| Sent: 28 June 2016 13:20
| To: Simon Peyton Jones <simonpj@microsoft.com>; tamar@zhox.com
| Cc: ghc-devs@haskell.org
| Subject: Re: msys2 64 bit: help help!
|
| On 27. 6. 2016 23:33, Simon Peyton Jones via ghc-devs wrote:
| > 1. I just left the machine for 10-15 mins and lo! the shell windows
| opened up. It just took a loooong time.
|
| I could be something with Active Directory. Cygwin (upon which is
| MSYS2 based) integrates with AD, but there are numerous (google-able)
| reports of huge slowdowns related to this.
|
| > At this point, starting a new shell no longer took a long time. It
| all seemed to be working.
|
| Also don't forget to exclude `C:\msys64` from any anti-virus scans.
|
|
| > 2. I then ran pacman -Syuu as instructed on the installation page:
| https://sourceforge.net/p/msys2/wiki/MSYS2%20installation/
|
| I'm afraid you misread the instructions. You should run `update-core`
| first to upgrade to the newer pacman that handles `pacman -Syuu`
| correctly. (New installer packages with an up-to-date pacman are
| planned.)
|
| > The log of what happened is below. There are numerous failures
| involving Cygwin, which I do not have installed, at least not so far
| as I know. I do not know if these failures matter.
|
| They might. See below.
|
| > 3. After this step, starting a shell failed altogether with
| "c:/msys64/mingw64_shell.bat is not recognised as an internal or
| external command". And sure enough, there is no such file. Presumably
| it existed in step 1. So perhaps step 2 deleted it?
|
| If the post-install script for `filesystem` were able to run, it would
| inform you that `*_shell.bat` are deprecated and were removed. I see
| you have `msys2-launcher-git` installed -- you can then use
| `C:\msys64\mingw64.exe` (and even pin it to the taskbar).
|
| > 4. As you mention, I then tried msys2_shell.cmd. It worked -- with
| a noticeable delay of 5 seconds or so.
|
| May still be AD-related.
|
| > * should I worry about all those install errs
|
| I recommend staying on the safe side and nuke the installation.
| Alternatively, reinstall the packages that had failures (`pacman -S
| gcc-libs gettext gmp ...`).
|
| > * how can I debug what's happening with
| > that long delay
|
| `/etc/nsswitch.conf` allows for some configuration. See
| <https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-mapping-nsswitch-
| pwdgrp>.
|
| > * Should I nuke the start menu shortcuts that
| > the msys64 installer so carefully installed
| > in favour of msys2_shell.cmd?
|
| Yes or see above. Note that you might need `msys2_shell.cmd -mingw64`
| instead (not sure if it matters for GHC).
|
| --
| David Macek
_______________________________________________
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs