[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs-26.0.91: switch-to-buffer-other-window runs too slowly (about

From: Eli Zaretskii
Subject: Re: Emacs-26.0.91: switch-to-buffer-other-window runs too slowly (about 0.1s)
Date: Thu, 29 Mar 2018 12:37:18 +0300

> Date: Tue, 27 Mar 2018 09:23:47 +0200
> From: martin rudalics <address@hidden>
> CC: address@hidden, address@hidden
>  > It seems to me that if FRAME_VISIBLE_P can return non-zero when a
>  > frame is not visible, we are toast anyhow, because we have no
>  > reasonable way of telling whether a frame is or isn't visible.
>  > Waiting for 100 msec is not a guarantee for having the frame visible
>  > afterwards, certainly not if we don't make sure it is so at the end of
>  > the wait.
>  >
>  > So I'd like to see some evidence of such grave problems, before we go
>  > on with such a problematic assumption.
> All I meant was that if FRAME_VISIBLE_P says that the frame is visible
> we should use that and we will find out soon enough if it doesn't tell
> us the truth.

Yes, agreed.

Noam, would you like to push a change like that to master, please?

>  > FWIW, the original wait loop did use FRAME_VISIBLE_P as an indication
>  > of whether we need the wait at all: it would not enter the loop if
>  > FRAME_VISIBLE_P returned non-zero.
> So x_make_frame_visible should not enter the loop when FRAME_VISIBLE_P
> returns non-zero but cannot rely on FRAME_VISIBLE_P to return non-zero
> in order to decide whether it's safe to leave the loop.

The original code did rely on FRAME_VISIBLE_P in both cases.  Since we
no longer process X events asynchronously, FRAME_VISIBLE_P cannot
change its value while we are inside the loop, I think.  But we do
know whether pselect that waits for MapNotify succeeded or not, if we
want/need that.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]