unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Spencer Baugh <sbaugh@janestreet.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org, azeng@janestreet.com
Subject: Re: Excessive redisplay from lots of process output
Date: Fri, 24 Feb 2023 15:33:52 -0500	[thread overview]
Message-ID: <CAO=BR8M_XO72YB9H+ZS__CxWNnsGNn0R20EC2ypSoqd1V7uhzA@mail.gmail.com> (raw)
In-Reply-To: <83a612n7dn.fsf@gnu.org>

On Fri, Feb 24, 2023 at 3:19 PM Eli Zaretskii <eliz@gnu.org> wrote:
>
> > From: Spencer Baugh <sbaugh@janestreet.com>
> > Date: Fri, 24 Feb 2023 15:08:17 -0500
> > Cc: emacs-devel@gnu.org,
> >   azeng@janestreet.com
> >
> > > This is normal.
> >
> > Just to make sure I understand, you said earlier:
> >
> > >There are many variables and flags Emacs uses to decide when something
> > >changed that needs the display to be updated.  Those should generally
> > >prevent Emacs from running the expensive parts of redisplay if they
> > >are unnecessary.  The question is why this doesn't work in your case.
> >
> > Are you saying this does not apply in the case of reading from
> > process output? That after reading process output, we always do
> > an expensive redisplay?
>
> Whether redisplay is expensive or not depends on many factors.  But we
> always flush the frame in that case, yes.

Why? It seems unnecessary if nothing has changed.

> > If so, it seems to me that this could be substantially improved.
> > Why do we always do an expensive redisplay after reading process
> > output, even if nothing has been changed to make it necessary?
>
> We don't always do an expensive redisplay, but we always call XFlush.
>
> > I would like to improve this so that my Emacs does not do
> > expensive redisplay whenever it reads process output, which is
> > substantially hurting performance for me when there's lots of
> > process output to read.
>
> AFAIU, what is problematic for you is the X traffic causes by XFlush.

I think that is problematic for anyone running with a slow X server; it
gives the X server a lot to process.  The fact that my X server is
across the network just makes my X server seem artificially slow.

In other words, I think XFlush should be considered "expensive" and
avoided where possible.



  reply	other threads:[~2023-02-24 20:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-17 15:16 Excessive redisplay from lots of process output Spencer Baugh
2023-02-17 16:06 ` Eli Zaretskii
2023-02-17 16:41   ` Spencer Baugh
2023-02-24 19:14   ` Spencer Baugh
2023-02-24 19:34     ` Eli Zaretskii
2023-02-24 20:08       ` Spencer Baugh
2023-02-24 20:19         ` Eli Zaretskii
2023-02-24 20:33           ` Spencer Baugh [this message]
2023-02-24 20:51             ` Eli Zaretskii
2023-02-24 23:14               ` Po Lu
2023-02-24 23:10     ` Po Lu
2023-02-25  7:35       ` Eli Zaretskii
2023-02-25  9:43         ` Po Lu

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAO=BR8M_XO72YB9H+ZS__CxWNnsGNn0R20EC2ypSoqd1V7uhzA@mail.gmail.com' \
    --to=sbaugh@janestreet.com \
    --cc=azeng@janestreet.com \
    --cc=eliz@gnu.org \
    --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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).