I am forced to use Windows 10 for a project. Yes, I would rather use GNU/Linux. To keep my sanity, I've tried to regard Windows as a bootloader for Emacs :)
Unfortunately, Magit (one of my favorite parts of Emacs, which also makes up for the lack of a good command line on Windows) is unbearably slow. I have an SSD, 16 GB of RAM and a quad-core i7 but it takes eight seconds to execute
magit-status on a small repository. Then, when I want to stage another change, it takes about 5 seconds per file.
Here's what I've tried:
$ git config --global core.preloadindex true
$ git config --global core.fscache true
$ git config --global gc.auto 256
- Adding the entire project to the Windows Defender (my only AV) exclusion list
- Setting the
magit-git-executableto the regular msysgit one I downloaded (https://git-for-windows.github.io/). I checked and
git statushere takes < 1 second. I know that
magit-statusdoes way more, but this is too much.
Can anyone suggest ways to make this faster? I can't imagine anyone using Magit on Windows like this.
It was suggested that this question is a duplicate, but they asked:
I'm struggling to understand why Emacs have noticeably shorter startup time on Ubuntu than Windows. Anyone knows the answer?
I know at least some reasons why Emacs, Git, and Magit are slower on Windows. I am asking how do I optimize Magit to do fewer things, or cache results, or something, even if it's at the expense of functionality.