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 #47 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: Wed, 08 Oct 2014 08:29:59 -0500
Stephen Leake <stephen_leake <at> stephe-leake.org> writes:

> It is still a problem on Windows; 12 seconds to read a megabyte is
> unacceptably slow for my real application.

The cause for this is the Sleep in _sys_read_ahead in w32.c. This is
called from reader_thread after the wait for a single char read
succeeds. The default wait is 50 ms, set by the elisp variable
w32-pipe-read-delay. Setting that to 0 gives:

(pipe-torture-read "/Projects/emacs/emacs-24.3.94/src/xdisp.c")
0.180000, 0.095000

only a factor of 2 slower than command-line cat.

w32-pipe-read-delay is a global variable. The comment in _sys_read_ahead
says there are problems with subprocess interaction when setting this to
0 on some systems. If that is still true, we may need to change this to
a per-subprocess setting.

In my real application, let-binding w32-pipe-read-delay for a short time
is possible, and a reasonable workaround.

--
-- 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.