From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#18626: 24.3.94; communication with subprocess is slow Date: Sat, 04 Oct 2014 11:07:14 +0300 Message-ID: <83oatsgswd.fsf@gnu.org> References: <85wq8ge3gr.fsf@stephe-leake.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1412410106 5018 80.91.229.3 (4 Oct 2014 08:08:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 4 Oct 2014 08:08:26 +0000 (UTC) Cc: 18626@debbugs.gnu.org To: stephen_leake@stephe-leake.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 04 10:08:18 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XaKO2-0007rD-Hn for geb-bug-gnu-emacs@m.gmane.org; Sat, 04 Oct 2014 10:08:18 +0200 Original-Received: from localhost ([::1]:42915 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XaKO2-0003s4-12 for geb-bug-gnu-emacs@m.gmane.org; Sat, 04 Oct 2014 04:08:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42244) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XaKNt-0003rz-2K for bug-gnu-emacs@gnu.org; Sat, 04 Oct 2014 04:08:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XaKNm-0002qW-RF for bug-gnu-emacs@gnu.org; Sat, 04 Oct 2014 04:08:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40932) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XaKNm-0002qS-Nl for bug-gnu-emacs@gnu.org; Sat, 04 Oct 2014 04:08:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XaKNm-0004Wf-61 for bug-gnu-emacs@gnu.org; Sat, 04 Oct 2014 04:08:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Oct 2014 08:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18626 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18626-submit@debbugs.gnu.org id=B18626.141241003717330 (code B ref 18626); Sat, 04 Oct 2014 08:08:02 +0000 Original-Received: (at 18626) by debbugs.gnu.org; 4 Oct 2014 08:07:17 +0000 Original-Received: from localhost ([127.0.0.1]:60729 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XaKN2-0004VP-Dq for submit@debbugs.gnu.org; Sat, 04 Oct 2014 04:07:16 -0400 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:61454) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XaKMz-0004VC-45 for 18626@debbugs.gnu.org; Sat, 04 Oct 2014 04:07:14 -0400 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0NCW00J00U90KB00@a-mtaout21.012.net.il> for 18626@debbugs.gnu.org; Sat, 04 Oct 2014 11:07:12 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NCW00JWMUJZHF60@a-mtaout21.012.net.il>; Sat, 04 Oct 2014 11:07:12 +0300 (IDT) In-reply-to: <85wq8ge3gr.fsf@stephe-leake.org> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:94114 Archived-At: > From: stephen_leake@stephe-leake.org > Date: Sat, 04 Oct 2014 01:47:16 -0500 > > (find-file "emacs-24.3.94/src/xdisp.c") > (pipe-torture "cat.exe") > => 11.255173 > > The time varies slightly with each run. "cat.exe" here is from Cygwin. > > For comparison, in a Cygwin bash shell on the same system: > > $ cd /tmp > $ time cat < /Projects/emacs/emacs-24.3.94/src/xdisp.c > xdisp.c > real 0m0.051s > user 0m0.000s > sys 0m0.030s Can you present similar timings from some Posix platform for comparison? > Doing (setq process-adaptive-read-buffering nil) did not change the > timing. AFAIK, this variable only matters for reading the subprocess output. Since you didn't present the results for that, there's no evidence yet which would support this conclusion. > (pipe-torture "debug.exe" "4096") > 4.797574 > > (pipe-torture "debug.exe" "40000") > 0.523758 > > The test with "debug.exe" can also be run in Emacs 24.3.1, since it does > not mix reads and writes (see bug 18420); it gives a time comparable to > the command-line "cat": 0.053000 That's actually evidence that playing with the 2 parameters mentioned on emacs-devel might make the time lower. Still, the question is what happens on GNU/Linux or some other popular Posix platform, in comparison with Windows. I get ~1.2 sec on one such machine, which is still a significant slowdown wrt file I/O outside of Emacs, by a factor of about 50. > In emacs 24.3.94: > (pipe-torture-read "/Projects/emacs/emacs-24.3.94/src/xdisp.c") > "read time 11.965184" > > In Windows native emacs 24.3.1: > (pipe-torture-read "/Projects/emacs/emacs-24.3.94/src/xdisp.c") > "read time 11.992000" That's identical, and expected: the changeset that solved the deadlock case only changes the way Emacs treats the write end of the pipe. The read end behaves in Emacs 24.4 identically to what it did in 24.3.