[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#26397: 25.1; call-process slow on macOS and slower on larger frames

From: YAMAMOTO Mitsuharu
Subject: bug#26397: 25.1; call-process slow on macOS and slower on larger frames
Date: Sat, 08 Apr 2017 16:37:29 +0900
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shij┼Ź) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI)

>>>>> On Fri, 7 Apr 2017 23:25:24 -0700, Aaron Jensen <aaronjensen@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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]