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: emacs communication with subprocess is slow Date: Fri, 03 Oct 2014 12:51:18 -0500 Message-ID: <851tqpf3e1.fsf@stephe-leake.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1412359741 30561 80.91.229.3 (3 Oct 2014 18:09:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 3 Oct 2014 18:09:01 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 03 20:08:55 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 1Xa7Hi-0002zJ-7B for ged-emacs-devel@m.gmane.org; Fri, 03 Oct 2014 20:08:54 +0200 Original-Received: from localhost ([::1]:40635 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xa7Hh-0000BK-Nj for ged-emacs-devel@m.gmane.org; Fri, 03 Oct 2014 14:08:53 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53571) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xa70x-0004jO-C8 for emacs-devel@gnu.org; Fri, 03 Oct 2014 13:51:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xa70r-0002EC-G4 for emacs-devel@gnu.org; Fri, 03 Oct 2014 13:51:35 -0400 Original-Received: from dnvrco-outbound-snat.email.rr.com ([107.14.73.225]:12368 helo=dnvrco-oedge-vip.email.rr.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xa70r-0002Dh-Ba for emacs-devel@gnu.org; Fri, 03 Oct 2014 13:51:29 -0400 Original-Received: from [70.94.38.149] ([70.94.38.149:64933] helo=TAKVER) by dnvrco-oedge03 (envelope-from ) (ecelerity 3.5.0.35861 r(Momo-dev:tip)) with ESMTP id 0F/FB-27958-D12EE245; Fri, 03 Oct 2014 17:51:25 +0000 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (windows-nt) X-RR-Connecting-IP: 107.14.64.142:25 X-Authority-Analysis: v=2.1 cv=L8aTQoj8 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=91GFiT9ARVGA9MCAv1IA:9 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:174952 Archived-At: This may be related to http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18420 I'm using Emacs pretest 24.3.93, with the patch from 18240, on Windows 7. I've run into another problem with Emacs communication with external processes; there seems to be a delay on every task switch. This shows up both when sending data to the subprocess, and when reading from it. I haven't tested this on Debian yet. The delay is not present in Emacs 24.3 on Windows 7. When sending the contents of an Emacs buffer (source code to be parsed) to the subprocess, if the read buffer in the subprocess is large enough to hold the entire contents, no delay is apparent. However, if the buffer is smaller, so that several reads are needed, then a delay appears. Similarly when sending data from the subprocess to Emacs. I suspect this doesn't show up with the 'cat' test in 18420 because cat uses multimegabyte buffers; it's designed for copying gigabyte files. 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?). Should I reopen 18240, or start a new bug? -- -- Stephe