| ▲ | KallDrexx 3 hours ago | |||||||
I notice it on macOS, which I use for work. I use Linux personally but no EDR there :) There are just so many little operations that cause stuttering on macOS with an unfortunately over-eager crowdstrike configuration. Magit is the worst offender but it causes paper cuts all over :( | ||||||||
| ▲ | iLemming 2 hours ago | parent [-] | |||||||
> I notice it on macOS So, on Mac there are two main problems - displaying and fork/exec. Rendering on Mac is slower because NS port display backend just sucks. Emacs's redisplay emits many small drawing operations per frame - one per glyph run, cursor, or fringe bitmap. X11/cairo and pgtk on Linux batch those very efficiently - Cocoa has nothing comparable here. You can try installing one of the forks of Mitsuharu's port - they usually have --with-metal flag and some other improvements, but they are typically one-two versions lagging behind, and in my experience they are not always stable. In general, possibility of Emacs dying on Mac is not zero, on Linux is much more rock solid. And then the forking problem. Emacs has a big heap, so each fork is expensive. On Mac it triggers all sorts of crap - code-signature validation, Gatekeeper/XProtect scanning, TCC checks. That's dozens of milliseconds per subprocess and Linux has no such crap to deal with - shit is just fast. Magit calls git dozens of times per refresh. Now multiply that and then you get usual complains - pestilence on poor Jonas Bernoulli: "I love Magit, but why is it so damn slow..." etc. Here are some things that I do to mitigate: - Do these and never touch keyboard rate settings in the UI, just do it, reboot and thank me later.
- disable App Nap for Emacs:
- I turned off Spotlight indexer completely - I don't search for files through it nor through Alfred.
- Set `core.fsmonitor true` in gitconfig. Add `core.untrackedCache true` to go with `status.showuntrackedfiles all`, otherwise the fsmonitor win is partly eaten by the untracked scan.- Remove sections from Magit you don't need all the time, e.g.:
There are some other things, but that's what I remember off the top of my head, if I recall some more, will update. | ||||||||
| ||||||||