[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Excessive redisplay from lots of process output
From: |
Po Lu |
Subject: |
Re: Excessive redisplay from lots of process output |
Date: |
Sat, 25 Feb 2023 07:14:30 +0800 |
XFlush is not so expensive, as it simply makes requests that are already in the
output buffer happen. An implicit flush happens before XNextEvent,
XEventsQueued, and XPending.
What is expensive is _XReply, so I would guess that is the source or Spencer's
problems. I removed most unnecessary calls from Emacs 29. If that is still
slow, then please tell me where the call is. Emacs should not call _XReply
just to redisplay!
On February 25, 2023 4:51:19 AM GMT+08:00, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Spencer Baugh <sbaugh@janestreet.com>
>> Date: Fri, 24 Feb 2023 15:33:52 -0500
>> Cc: emacs-devel@gnu.org,
>> azeng@janestreet.com
>>
>> 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.
>
>I'm not sure we know that nothing has changed. I'm also not sure I
>understand why XFlush is so expensive when nothing or almost nothing
>has changed on display. Maybe Po Lu could comment.
>
>> > 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.
>
>Are you sure? What exactly does XFlush send to the X server if
>nothing was changed on display?
>
>> In other words, I think XFlush should be considered "expensive" and
>> avoided where possible.
>
>If that is possible, I agree.
>
- Excessive redisplay from lots of process output, Spencer Baugh, 2023/02/17
- Re: Excessive redisplay from lots of process output, Eli Zaretskii, 2023/02/17
- Re: Excessive redisplay from lots of process output, Spencer Baugh, 2023/02/17
- Re: Excessive redisplay from lots of process output, Spencer Baugh, 2023/02/24
- Re: Excessive redisplay from lots of process output, Eli Zaretskii, 2023/02/24
- Re: Excessive redisplay from lots of process output, Spencer Baugh, 2023/02/24
- Re: Excessive redisplay from lots of process output, Eli Zaretskii, 2023/02/24
- Re: Excessive redisplay from lots of process output, Spencer Baugh, 2023/02/24
- Re: Excessive redisplay from lots of process output, Eli Zaretskii, 2023/02/24
- Re: Excessive redisplay from lots of process output,
Po Lu <=
- Re: Excessive redisplay from lots of process output, Po Lu, 2023/02/24
- Re: Excessive redisplay from lots of process output, Eli Zaretskii, 2023/02/25
- Re: Excessive redisplay from lots of process output, Po Lu, 2023/02/25