From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.bugs Subject: bug#26397: 25.1; call-process slow on macOS and slower on larger frames Date: Sat, 08 Apr 2017 16:37:29 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: blaine.gmane.org 1491637101 15396 195.159.176.226 (8 Apr 2017 07:38:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 8 Apr 2017 07:38:21 +0000 (UTC) User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?UTF-8?Q?Shij=C5=8D?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) Cc: 26397@debbugs.gnu.org To: Aaron Jensen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Apr 08 09:38:14 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cwkwl-0002rY-8P for geb-bug-gnu-emacs@m.gmane.org; Sat, 08 Apr 2017 09:38:11 +0200 Original-Received: from localhost ([::1]:53825 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cwkwq-0001H0-Qt for geb-bug-gnu-emacs@m.gmane.org; Sat, 08 Apr 2017 03:38:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52879) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cwkwg-0001Gj-RT for bug-gnu-emacs@gnu.org; Sat, 08 Apr 2017 03:38:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cwkwc-0001mC-H3 for bug-gnu-emacs@gnu.org; Sat, 08 Apr 2017 03:38:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:38829) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cwkwc-0001m8-DI for bug-gnu-emacs@gnu.org; Sat, 08 Apr 2017 03:38:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cwkwc-0004q2-2f for bug-gnu-emacs@gnu.org; Sat, 08 Apr 2017 03:38:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: YAMAMOTO Mitsuharu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 08 Apr 2017 07:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26397 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 26397-submit@debbugs.gnu.org id=B26397.149163705618565 (code B ref 26397); Sat, 08 Apr 2017 07:38:01 +0000 Original-Received: (at 26397) by debbugs.gnu.org; 8 Apr 2017 07:37:36 +0000 Original-Received: from localhost ([127.0.0.1]:37028 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cwkwB-0004pM-LU for submit@debbugs.gnu.org; Sat, 08 Apr 2017 03:37:35 -0400 Original-Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:63884) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cwkw8-0004pB-Nu for 26397@debbugs.gnu.org; Sat, 08 Apr 2017 03:37:34 -0400 Original-Received: from fermat1.math.s.chiba-u.ac.jp (fermat [192.168.32.10]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 46B1DF08F4; Sat, 8 Apr 2017 16:37:29 +0900 (JST) (envelope-from mituharu@math.s.chiba-u.ac.jp) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:131351 Archived-At: >>>>> On Fri, 7 Apr 2017 23:25:24 -0700, Aaron Jensen 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@math.s.chiba-u.ac.jp