From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#24091: 24.5; High CPU usage at startup while hidden Date: Tue, 17 Jan 2017 05:40:02 +0200 Message-ID: <8337gi9wx9.fsf@gnu.org> References: <24533f31-9fc2-b38e-aaeb-561616cdf77f@gmail.com> <87shut9pyk.fsf@users.sourceforge.net> <83lh0lq9n5.fsf@gnu.org> <83oa5fp1zb.fsf@gnu.org> <877fbkw7b1.fsf@users.sourceforge.net> <83inv1fnf9.fsf@gnu.org> <83zinodghv.fsf@gnu.org> <83y438de6m.fsf@gnu.org> <57CBCE4F.5040705@gmx.at> <57CC1E5F.8010107@gmx.at> <57CC4435.7040503@gmx.at> <838tv5au9g.fsf@gnu.org> <87shons1mf.fsf@gmail.com> <87a8auzait.fsf@users.sourceforge.net> <83pojqaxjc.fsf@gnu.org> <1293E48B-0D9B-481C-AE7B-111B356C06BD@raeburn.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1484624478 7643 195.159.176.226 (17 Jan 2017 03:41:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 17 Jan 2017 03:41:18 +0000 (UTC) Cc: dominik.schrempf@gmail.com, npostavs@users.sourceforge.net, acairncross@gmail.com, clement.pit@gmail.com, 24091@debbugs.gnu.org To: Ken Raeburn Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jan 17 04:41:11 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cTKdx-0000v8-IC for geb-bug-gnu-emacs@m.gmane.org; Tue, 17 Jan 2017 04:41:09 +0100 Original-Received: from localhost ([::1]:32797 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cTKdz-00012p-44 for geb-bug-gnu-emacs@m.gmane.org; Mon, 16 Jan 2017 22:41:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53441) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cTKdt-00012j-6h for bug-gnu-emacs@gnu.org; Mon, 16 Jan 2017 22:41:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cTKdq-0008Bt-3d for bug-gnu-emacs@gnu.org; Mon, 16 Jan 2017 22:41:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:40642) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cTKdq-0008Ba-0A for bug-gnu-emacs@gnu.org; Mon, 16 Jan 2017 22:41:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cTKdp-0006dq-NJ for bug-gnu-emacs@gnu.org; Mon, 16 Jan 2017 22:41:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 17 Jan 2017 03:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24091 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed patch Original-Received: via spool by 24091-submit@debbugs.gnu.org id=B24091.148462443925493 (code B ref 24091); Tue, 17 Jan 2017 03:41:01 +0000 Original-Received: (at 24091) by debbugs.gnu.org; 17 Jan 2017 03:40:39 +0000 Original-Received: from localhost ([127.0.0.1]:56041 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cTKdT-0006d7-KB for submit@debbugs.gnu.org; Mon, 16 Jan 2017 22:40:39 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:34158) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cTKdS-0006cu-9H for 24091@debbugs.gnu.org; Mon, 16 Jan 2017 22:40:38 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cTKdK-0007dK-1B for 24091@debbugs.gnu.org; Mon, 16 Jan 2017 22:40:33 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:58859) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cTKdA-0007Tx-8k; Mon, 16 Jan 2017 22:40:20 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3907 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cTKd8-0003fR-EC; Mon, 16 Jan 2017 22:40:19 -0500 In-reply-to: <1293E48B-0D9B-481C-AE7B-111B356C06BD@raeburn.org> (message from Ken Raeburn on Mon, 16 Jan 2017 18:36:05 -0500) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:128159 Archived-At: > From: Ken Raeburn > Date: Mon, 16 Jan 2017 18:36:05 -0500 > Cc: npostavs@users.sourceforge.net, > dominik.schrempf@gmail.com, > 24091@debbugs.gnu.org, > acairncross@gmail.com, > clement.pit@gmail.com > > > 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. OK, let's try.