[Top][All Lists]

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

Re: What makes set-window-buffer slow?

From: Eli Zaretskii
Subject: Re: What makes set-window-buffer slow?
Date: Sat, 25 Jun 2016 17:27:17 +0300

> Cc: address@hidden, address@hidden, address@hidden
> From: Clément Pit--Claudel <address@hidden>
> Date: Sat, 25 Jun 2016 10:07:11 -0400
> > Does the WINDOW argument of set-window-buffer name the selected window
> > at the time of the call?  If not, set-window-buffer will cause all the
> > other windows to be redisplayed, so arranging for WINDOW to be the
> > selected window might speed up things.
> The window was indeed not selected at the time of the call. Would a
> simple with-selected-window around the call do it?

Yes, I think so.  Although it'd be better to arrange that to happen
without the need to select the window, if possible.

> If so, could set-window-buffer just do that?

No, of course not.  We don't know at this level what is the
programmer's intent.

> Btw, do you think there is any issue with just not calling set-window-buffer 
> if the window already contains that buffer?

Not sure I understand the question: how can there be an issue when NOT
doing something?

> Would it be useful for me to profile the same code on my own
> machine? Maybe comparing the profiles would help.

Could be.  But identifying the differences is also useful.

> > Finally, if the user can try a later Emacs, it might help, because
> > some non-trivial redisplay optimizations were done since 24.4.
> Ok, I'll keep this in mind; I don't think that will happen for them until 
> Debian updates, though. And in any case, I don't even have this problem on 
> 24.4...

The optimizations might well affect only some system configurations.

reply via email to

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