all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: storm@cua.dk (Kim F. Storm)
Cc: emacs-devel@gnu.org
Subject: Re: Fix for slow process output processing (please test).
Date: 05 Jan 2004 00:00:31 +0100	[thread overview]
Message-ID: <m3k747tj3k.fsf@kfs-l.imdomain.dk> (raw)
In-Reply-To: <x5y8spukv9.fsf@lola.goethe.zz>

David Kastrup <dak@gnu.org> writes:

> While I have been abysmally absent in testing this patch before it
> finally got applied, I would like to mention that I now benchmarked
> the behavior with and without process-adaptive-read-buffering set for
> a typical preview-latex document.  With the patch, the real time for
> the initial LaTeX run (which is somewhat comint-like) was about half
> with adaptive read buffering set.  And it must be mentioned that I had
> already trimmed output to the necessary minimum before because I had
> noticed a heavy speed impact for I/O.

I suppose we might improve it further by increasing the read buffer
size from 1024 bytes to 4096 bytes.  I think you could easily try that
in process.c.  Just change

   int readmax = 1024;

to

  int readmax = 4096;


> 
> The subsequent GhostScript usage as a daemon (where lines of command
> and very brief responses are passed back and forth between Emacs and
> GhostScript) was not affected in its operation time.
> 
> One thing that might be worth mentioning in the variable
> process-adaptive-read-buffering is that it is conceivable that it
> would offer no or slightly negative impact on multiprocessor machines
> where the data generating process can make progress independent of the
> CPU time Emacs spends on consuming the data.
> 
> It would be nice if somebody that has a multiprocessor box would test
> this.

If the process can produce output at a sufficient rate, the adaptive
read buffering shouldn't be activated at all, so I would suppose that the effect will be minimal

> 
> Thanks a lot: I guess this change will be quite welcome for all users
> that use Emacs as shell/terminal/process environment in one way or
> another.

We still have to see if there are some unwanted effects -- if so, we
can fix them by let-binding process-adaptive-read-buffering to nil
around start-process calls. 

There might also be systems where the patch has an overall negative
effect; on such systems we should disable it all-together.  Time will
tell.

-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

  reply	other threads:[~2004-01-04 23:00 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-16  1:21 Fix for slow process output processing (please test) Kim F. Storm
2003-12-16  2:14 ` David Kastrup
2003-12-16  3:34 ` David Kastrup
2003-12-16 10:23   ` Kim F. Storm
2003-12-16 11:51     ` David Kastrup
2003-12-16 13:24       ` Kim F. Storm
2004-01-03 15:12         ` David Kastrup
2004-01-04 23:00           ` Kim F. Storm [this message]
2004-01-03 22:07 ` Eric Hanchrow
2004-01-04 22:42   ` Kim F. Storm
2004-01-05 15:57     ` David Kastrup
2004-01-05 19:09       ` Eli Zaretskii
2004-01-05 19:39         ` David Kastrup
2004-01-05 19:52         ` Jason Rumney
2004-01-05 23:28           ` Kim F. Storm
2004-01-05 23:16             ` Jason Rumney
2004-01-05 23:44               ` David Kastrup
2004-01-06  0:23                 ` Jason Rumney
2004-01-07  0:40               ` Kim F. Storm
2004-01-05 23:35       ` Kim F. Storm
2004-01-05 22:50         ` David Kastrup
2004-01-06  0:09           ` Kim F. Storm

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=m3k747tj3k.fsf@kfs-l.imdomain.dk \
    --to=storm@cua.dk \
    --cc=emacs-devel@gnu.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.