all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* magit lags on macOS 12
@ 2023-12-07  7:45 zhanghj
  2023-12-18 15:25 ` Danny Freeman
  0 siblings, 1 reply; 3+ messages in thread
From: zhanghj @ 2023-12-07  7:45 UTC (permalink / raw)
  To: help-gnu-emacs

I'm using GNU Emacs on macOS.

I remember that before Emacs 26, running magit in Emacs was slow because 
Emacs called the child process using the 'fork' syscall.
Later, emacs26 used 'vfork', and then it no longer stuttered.

Now that I've upgraded my macOS to 12.7, I'm starting to see that magit 
is starting to get sluggish again, about the same as it was before Emacs 26.
I tried Emacs 27 and 29, both of which are rather sluggish. Why is that?




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: magit lags on macOS 12
  2023-12-07  7:45 magit lags on macOS 12 zhanghj
@ 2023-12-18 15:25 ` Danny Freeman
  2023-12-19 14:44   ` Ben Hancock
  0 siblings, 1 reply; 3+ messages in thread
From: Danny Freeman @ 2023-12-18 15:25 UTC (permalink / raw)
  To: zhanghj; +Cc: help-gnu-emacs


zhanghj <ccsmile2008@outlook.com> writes:

> I'm using GNU Emacs on macOS.
>
> I remember that before Emacs 26, running magit in Emacs was slow because Emacs called the child
> process using the 'fork' syscall.
> Later, emacs26 used 'vfork', and then it no longer stuttered.
>
> Now that I've upgraded my macOS to 12.7, I'm starting to see that magit is starting to get sluggish
> again, about the same as it was before Emacs 26.
> I tried Emacs 27 and 29, both of which are rather sluggish. Why is that?

Magit is also slow for me on Emacs 29 running the latest OSX, but it's
difficult to determine why. I think part of the reason for me is all the
other software installed by my enterprise like virus scanners,
constantly running backups, the sorts of things I don't have much
control over.

Making sure Magit is using the version of git installed by apple/xcode
at /usr/bin/git (NOT the one from homebrew or other package managers)
seems to help with slowness. Git itself is pretty slow on OSX, but the
one apple provides seems to be the fastest.

Using apple's git won't completely resolve the slowness, but it may
help a little.

If you find another fix please post here because the speed of Emacs on
my macbook is almost unbearable.

-- 
Danny Freeman



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: magit lags on macOS 12
  2023-12-18 15:25 ` Danny Freeman
@ 2023-12-19 14:44   ` Ben Hancock
  0 siblings, 0 replies; 3+ messages in thread
From: Ben Hancock @ 2023-12-19 14:44 UTC (permalink / raw)
  To: help-gnu-emacs; +Cc: zhanghj, Danny Freeman

Danny Freeman <danny@dfreeman.email> writes:

> zhanghj <ccsmile2008@outlook.com> writes:
>
> > I'm using GNU Emacs on macOS.
> >
> > I remember that before Emacs 26, running magit in Emacs was slow
> > because Emacs called the child process using the 'fork' syscall.
> > Later, emacs26 used 'vfork', and then it no longer stuttered.
> >
> > Now that I've upgraded my macOS to 12.7, I'm starting to see that
> > magit is starting to get sluggish again, about the same as it was
> > before Emacs 26. I tried Emacs 27 and 29, both of which are rather
> > sluggish. Why is that?
>
> Magit is also slow for me on Emacs 29 running the latest OSX, but
> it's difficult to determine why. I think part of the reason for me
> is all the other software installed by my enterprise like virus
> scanners, constantly running backups, the sorts of things I don't
> have much control over.

This may not fix your problem, but have you tried adjusting the option
`magit-diff-refine-hunk`? Docs here:

https://magit.vc/manual/magit/Diff-Options.html

Setting it to nil or t may help improve performance (though I'm not on
a Mac so I can't confirm).

Also, FWIW, while magit is a great package it might be worth
considering just using the built-in vc mode:

https://www.gnu.org/software/emacs/manual/html_node/emacs/Version-Control.html

It's quite fast and I find for most of my uses, it's just what I need.

- Ben



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-12-19 14:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-07  7:45 magit lags on macOS 12 zhanghj
2023-12-18 15:25 ` Danny Freeman
2023-12-19 14:44   ` Ben Hancock

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.