From: Eli Zaretskii <eliz@gnu.org>
To: Stephen Leake <stephen_leake@stephe-leake.org>
Cc: 18626@debbugs.gnu.org
Subject: bug#18626: 24.3.94; communication with subprocess is slow
Date: Sat, 04 Oct 2014 11:32:00 +0300 [thread overview]
Message-ID: <83lhowgrr3.fsf@gnu.org> (raw)
In-Reply-To: <85d2a8dzkh.fsf@stephe-leake.org>
> From: Stephen Leake <stephen_leake@stephe-leake.org>
> Date: Sat, 04 Oct 2014 03:11:26 -0500
>
> The send_process time delay is the cause of the slowdown in write:
>
> (find-file "xdisp.c")
> (pipe-torture "debug.exe" "4096")
>
> delay time
> ------------------------
> 20 * 1000 * 1000 4.450068
> 10 * 1000 * 1000 2.443788
> 0 * 1000 * 1000 hangs until C-g
>
> xdisp.c has 974233 bytes; with a subprocess read buffer of 4096 and a
> delay of 0.020 seconds, that gives a send time of (* 0.020 (/ 974233
> 4096)) = 4.74, which is close to what we see above.
>
> One way around the write delay is to use a large enough read buffer in
> the subprocess. In my current real application, this is easy and also
> gives other benefits.
>
> I'm not clear why Emacs hangs with a delay of 0. The subprocess should
> be running on a separate CPU core, so even if the Emacs process is in a
> busy wait loop, the subprocess should read input.
Did you try with 5 msec instead of zero?
Anyway, for 24.4 all I can suggest is a variable to replace the fixed
20 msec value. Doing anything more complicated than that would be too
dangerous this late into the pretest.
next prev parent reply other threads:[~2014-10-04 8:32 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-04 6:47 bug#18626: 24.3.94; communication with subprocess is slow stephen_leake
2014-10-04 8:07 ` Eli Zaretskii
2014-10-05 13:20 ` Stephen Leake
2014-10-05 13:41 ` Stephen Leake
2014-10-05 14:43 ` Eli Zaretskii
2014-10-05 18:19 ` Stephen Leake
2014-10-04 8:11 ` Stephen Leake
2014-10-04 8:32 ` Eli Zaretskii [this message]
2014-10-04 22:29 ` Stefan Monnier
2014-10-05 2:46 ` Eli Zaretskii
2014-10-05 13:34 ` Stephen Leake
2014-10-05 14:40 ` Eli Zaretskii
2014-10-05 18:25 ` Stephen Leake
2014-10-05 19:04 ` Eli Zaretskii
2014-10-08 13:29 ` Stephen Leake
2014-10-08 13:53 ` Eli Zaretskii
2014-10-10 8:07 ` Stephen Leake
2014-10-10 9:13 ` Eli Zaretskii
2014-10-10 8:47 ` Stephen Leake
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83lhowgrr3.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=18626@debbugs.gnu.org \
--cc=stephen_leake@stephe-leake.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.