GNU bug report logs - #24091
24.5; High CPU usage at startup while hidden

Previous Next

Package: emacs;

Reported by: aiken <acairncross <at> gmail.com>

Date: Wed, 27 Jul 2016 23:25:01 UTC

Severity: normal

Tags: confirmed, fixed, patch

Merged with 20335

Found in versions 24.4, 24.5, 25.1-rc1

Fixed in version 26.1

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Ken Raeburn <raeburn <at> raeburn.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: dominik.schrempf <at> gmail.com, 24091 <at> debbugs.gnu.org, acairncross <at> gmail.com, clement.pit <at> gmail.com, npostavs <at> users.sourceforge.net
Subject: bug#24091: 24.5; High CPU usage at startup while hidden
Date: Mon, 16 Jan 2017 18:36:05 -0500
On Jan 14, 2017, at 02:52, Eli Zaretskii <eliz <at> gnu.org> wrote:

>> From: npostavs <at> users.sourceforge.net
>> Cc: Eli Zaretskii <eliz <at> gnu.org>,  24091 <at> debbugs.gnu.org,  acairncross <at> gmail.com,  clement.pit <at> gmail.com
>> Date: Fri, 13 Jan 2017 20:38:02 -0500
>> 
>> We left things inconclusive, but revisiting this now, I see no reason
>> against simply removing this waiting loop:
> 
> Are you saying that the loop has no purpose at all?  If it does, what
> will happen with the code which needs that loop?  E.g., AFAIK some
> stuff is impossible to do without the frame actually being shown on
> display.
> 
> But maybe I'm wrong.  Ken, can you comment on this, please?

As I understand it, from the function’s comments and stuff I’ve read so far about the X11 and window manager protocols, the function already cannot guarantee that the window is visible when it returns, it can only request of the window manager that it make the window visible, which may or may not happen soon.  In that sense, I think Noam’s right and we could just discard the loop.

On the other hand, there are probably environments and situations (depending on the use of virtual desktops, choice of window manager, etc) where the current code does, in fact, wait for the window to appear, and won’t any more if we remove the loop.  Given that we should redraw things on expose events anyway, I’m not sure it'll matter, unless someone’s following up a call to make-frame-visible with some other action that needs to be delayed until after the window is actually visible.  I think it’s probably worth trying it to see if any differences are noticed under any of the environments people are using.

Ken



This bug report was last modified 7 years and 264 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.