Issue described here: https://lists.gnu.org/archive/html/bug-gnu-emacs/2017-04/msg00201.html In particular fixes lagging magit, as described here: https://magit.vc/manual/magit/MacOS-Performance.html The .patch file is taken from the reference there. The fix is in Emacs master, so this patch should be removed when switching to Emacs 26.1.