GNU bug report logs - #26397
25.1; call-process slow on macOS and slower on larger frames

Previous Next

Package: emacs;

Reported by: Aaron Jensen <aaronjensen <at> gmail.com>

Date: Sat, 8 Apr 2017 06:26:02 UTC

Severity: normal

Tags: fixed

Found in version 25.1

Fixed in version 26.1

Done: Alan Third <alan <at> idiocy.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>
To: Aaron Jensen <aaronjensen <at> gmail.com>
Cc: 26397 <at> debbugs.gnu.org
Subject: bug#26397: 25.1; call-process slow on macOS and slower on larger frames
Date: Sat, 08 Apr 2017 16:37:29 +0900
>>>>> On Fri, 7 Apr 2017 23:25:24 -0700, Aaron Jensen <aaronjensen <at> gmail.com> said:

> It seems that `call-process' on macOS is quite a bit slower than it is
> on linux. Not only that, but the performance degrades as the frame gets
> larger.

> Using this as a benchmark in 'emacs -Q':

> (benchmark 1 '(call-process "/usr/bin/true" nil nil nil))

> With a small frame (default emacs size):

> Elapsed time: 0.003509s

> With a larger frame (about 1500x1500px):

> Elapsed time: 0.007011s

> On Linux it's been reported that times are typically in the 1-2ms range.

> I originally came across this via this magit issue:
> https://github.com/magit/magit/issues/2909 because magit, for many
> common operations, can call call-process many times, making the
> performance difference significant. Note that people in the thread are
> seeing even worse performance.

Probably "fork" copies some GUI resources.  That would also explain
why the performance is worse on the Mac port, where each frame
allocates an extra NSWindow for overlaying.

It becomes much faster and seemingly unaffected by the frame size if
you comment out "#undef HAVE_WORKING_VFORK" and "#define vfork fork"
in src/conf_post.h.  But I'm not sure if it is safe.

				     YAMAMOTO Mitsuharu
				mituharu <at> math.s.chiba-u.ac.jp




This bug report was last modified 3 years and 199 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.