all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Stefan Monnier" <monnier+gnu/emacs@rum.cs.yale.edu>
Cc: emacs-devel@gnu.org
Subject: Re: Any idea about what makes Emacs slow reading on pipes?
Date: Sat, 17 May 2003 19:07:02 -0400	[thread overview]
Message-ID: <200305172307.h4HN728c007013@rum.cs.yale.edu> (raw)
In-Reply-To: 5xznllw0wp.fsf@kfs2.cua.dk

> > No, that isn't it.  I can pipe the stuff into |cat >/dev/null instead
> > of Emacs, and it will be finished in a whiffy.  Emacs must be using
> > some sort of system call that _stops_ dd most of the time from being
> > able to so another write to the pipe until the Linux scheduler has run
> > again (which it does at the rate of about 100 per second, almost
> > exactly the rate at which characters arrive).
> That is because emacs is using a pty by default for process i/o (I

But David pointed out several times that asking Emacs to use a pipe didn't
make any difference.

BTW, on my machine (266Mhz PII) the result of his test is basically always
1024.  If I put the process' output in a hidden buffer, I then get mostly
1024 but a few smaller entries, the smaller being 382 on the test run I did.
Looks like my Emacs is just not fast enough.

> Come on yourself...  This illustrates that if you use
>         "tex ... | dd bs=1k"
> instead of just
>         "tex ..."
> in acutex, you'll probably end up with much faster performance
> since you will get buffered output from tex.

But there's still something very fishy: he gets poor performance
while at the same time Emacs only reads one char at a time.
In your interpretation, the reason why only 1 char is read each time
is because Emacs is so fast that it keeps up with the input data, but
then why would the whole thing be so slow (considering that `dd' is
pretty fast when writing somewhere else, even with 1-byte-at-a-time
buffering).
So is it that Emacs ends up somehow slowing down `dd' to a crawl ?  How ?

>         M-: (setq process-connection-type nil)
> before you run your acutex process, and see if that makes a difference.

I think it's pretty clear that his test case is showing anomalous
behavior, based on his description.  And his test case doesn't
use AUCTeX.  I can't reproduce it, tho.


	Stefan

  reply	other threads:[~2003-05-17 23:07 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-16 13:08 Any idea about what makes Emacs slow reading on pipes? David Kastrup
2003-05-16 13:55 ` Andreas Schwab
2003-05-16 17:18 ` Kevin Rodgers
2003-05-16 17:34   ` David Kastrup
2003-05-16 18:38     ` Kevin Rodgers
2003-05-16 18:49       ` David Kastrup
2003-05-16 17:48 ` Jan D.
2003-05-16 18:38   ` David Kastrup
2003-05-16 20:23     ` Jan D.
2003-05-16 21:00     ` Andreas Schwab
2003-05-16 23:17     ` Satyaki Das
2003-05-17  1:50     ` Kim F. Storm
2003-05-17  0:34       ` David Kastrup
2003-05-18  0:31         ` Kim F. Storm
2003-05-17 23:07           ` Stefan Monnier [this message]
2003-05-17 23:39           ` David Kastrup
2003-05-18  2:09             ` Stefan Monnier
2003-05-18  8:45             ` Kai Großjohann
2003-05-18 10:12               ` David Kastrup
2003-05-18 19:04               ` Richard Stallman
2003-05-18 19:46                 ` David Kastrup
2003-05-19  7:33                   ` Kai Großjohann
2003-05-19  8:24                     ` David Kastrup
2003-05-18  8:46             ` Kai Großjohann
2003-05-18 10:03               ` David Kastrup
2003-05-18 15:09                 ` Kai Großjohann
2003-05-18 15:36                   ` David Kastrup
2003-05-18 15:50                     ` Kai Großjohann
2003-05-18 16:28                       ` David Kastrup
2003-05-19  7:26                         ` Kai Großjohann
2003-05-19  8:09                           ` David Kastrup
2003-05-18 19:03           ` Richard Stallman

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=200305172307.h4HN728c007013@rum.cs.yale.edu \
    --to=monnier+gnu/emacs@rum.cs.yale.edu \
    --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.