GNU bug report logs - #18626
24.3.94; communication with subprocess is slow

Previous Next

Package: emacs;

Reported by: stephen_leake <at> stephe-leake.org

Date: Sat, 4 Oct 2014 06:48:02 UTC

Severity: normal

Found in version 24.3.94

Full log


Message #56 received at 18626 <at> debbugs.gnu.org (full text, mbox):

From: Stephen Leake <stephen_leake <at> stephe-leake.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 18626 <at> debbugs.gnu.org
Subject: Re: bug#18626: 24.3.94; communication with subprocess is slow
Date: Fri, 10 Oct 2014 03:47:12 -0500
There remains a problem on Linux; with either a pty or a pipe, there is
a default internal buffer of 2^16 bytes, which means we encounter the
send_process EWOULDBLOCK delay of 20 ms for every 2^16 bytes; that takes
0.3 seconds for 1 megabyte:

(find-file "xdisp.c")
(pipe-torture
"/home/Projects/org.emacs.ada-mode.stephe-1/build/wisi/debug_counted"
"974233" "974233")
send time 0.291322


The pipe is created by emacs_pipe in sysdep.c; there is no parameter for
the internal buffer size.

The pty is created by allocate_pty in process.c; I don't see a size
parameter there, but there are lots of macros.

However, changing the value for the nsecs parameter in the call to
wait_reading_process_output in send_process at process.c:4282 has no
effect, so the 20 ms delay is coming from something else.

-- 
-- Stephe




This bug report was last modified 10 years and 254 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.