From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Leake Newsgroups: gmane.emacs.devel Subject: Re: emacs communication with subprocess is slow Date: Sat, 04 Oct 2014 01:51:26 -0500 Message-ID: <85lhowe39t.fsf@stephe-leake.org> References: <851tqpf3e1.fsf@stephe-leake.org> <83zjddgg1s.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1412405520 23845 80.91.229.3 (4 Oct 2014 06:52:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 4 Oct 2014 06:52:00 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 04 08:51:53 2014 Return-path: Envelope-to: ged-emacs-devel@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 1XaJC5-0007Ie-5z for ged-emacs-devel@m.gmane.org; Sat, 04 Oct 2014 08:51:53 +0200 Original-Received: from localhost ([::1]:42769 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XaJC4-0003YT-Nc for ged-emacs-devel@m.gmane.org; Sat, 04 Oct 2014 02:51:52 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60881) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XaJBs-0003YL-T7 for emacs-devel@gnu.org; Sat, 04 Oct 2014 02:51:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XaJBn-00065y-0E for emacs-devel@gnu.org; Sat, 04 Oct 2014 02:51:40 -0400 Original-Received: from dnvrco-outbound-snat.email.rr.com ([107.14.73.225]:39277 helo=dnvrco-oedge-vip.email.rr.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XaJBm-00065t-Qo for emacs-devel@gnu.org; Sat, 04 Oct 2014 02:51:34 -0400 Original-Received: from [70.94.38.149] ([70.94.38.149:65435] helo=TAKVER) by dnvrco-oedge02 (envelope-from ) (ecelerity 3.5.0.35861 r(Momo-dev:tip)) with ESMTP id 53/40-08316-6F89F245; Sat, 04 Oct 2014 06:51:34 +0000 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (windows-nt) X-RR-Connecting-IP: 107.14.64.130:25 X-Authority-Analysis: v=2.1 cv=ReIeCjdv c=1 sm=1 tr=0 a=AppmJ/7ZOOFWL/q6u6u93g==:117 a=AppmJ/7ZOOFWL/q6u6u93g==:17 a=ayC55rCoAAAA:8 a=9XSUBuVRJI8A:10 a=o_R75loqY_IA:10 a=9i_RQKNPAAAA:8 a=mDV3o1hIAAAA:8 a=cEN1ppS5dyAYiVraO_wA:9 a=ii61gXl28gQA:10 X-Cloudmark-Score: 0 X-detected-operating-system: by eggs.gnu.org: BaiduSpider X-Received-From: 107.14.73.225 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:174962 Archived-At: Eli Zaretskii writes: > Sorry, I don't understand: Emacs 24.3 would simply deaqdlock in this > situation, as we have established in bug #18420. But you say that not > only does it not hang, it is even faster. What am I missing? > > And what exactly does "large enough" mean here? What sizes are we > talking about? > > Also, can you quantify the delays? I submitted bug 18626; see details there. >> I can use a large buffer in my subprocess for read as a workaround, but >> I have no control over the read buffer in Emacs (perhaps that could be >> added?). > > You could try playing with 2 parameters that currently are fixed: the > size of the pipe buffer (set by pipe2 in w32.c, where we use 0 which > AFAIK defaults to 4KB); and the delay used by send_process in > process.c when it gets EAGAIN/EWOULDBLOCK from the 'write' call > (currently 20 milliseconds). I'll try this and reply in the bug. -- -- Stephe