From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#24091: 24.5; High CPU usage at startup while hidden Date: Fri, 29 Jul 2016 08:46:22 +0300 Message-ID: <83lh0lq9n5.fsf@gnu.org> References: <24533f31-9fc2-b38e-aaeb-561616cdf77f@gmail.com> <87shut9pyk.fsf@users.sourceforge.net> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1469771254 20996 80.91.229.3 (29 Jul 2016 05:47:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 29 Jul 2016 05:47:34 +0000 (UTC) Cc: acairncross@gmail.com, clement.pit@gmail.com, 24091@debbugs.gnu.org To: npostavs@users.sourceforge.net Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 29 07:47:23 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bT0dm-00079Y-Vg for geb-bug-gnu-emacs@m.gmane.org; Fri, 29 Jul 2016 07:47:23 +0200 Original-Received: from localhost ([::1]:57588 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bT0dd-0004YH-Ds for geb-bug-gnu-emacs@m.gmane.org; Fri, 29 Jul 2016 01:47:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33450) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bT0dX-0004Y4-7T for bug-gnu-emacs@gnu.org; Fri, 29 Jul 2016 01:47:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bT0dS-0002i0-AY for bug-gnu-emacs@gnu.org; Fri, 29 Jul 2016 01:47:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:52604) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bT0dS-0002hw-6i for bug-gnu-emacs@gnu.org; Fri, 29 Jul 2016 01:47:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bT0dS-0004w6-2P for bug-gnu-emacs@gnu.org; Fri, 29 Jul 2016 01:47:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 29 Jul 2016 05:47:02 +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 Original-Received: via spool by 24091-submit@debbugs.gnu.org id=B24091.146977120418950 (code B ref 24091); Fri, 29 Jul 2016 05:47:02 +0000 Original-Received: (at 24091) by debbugs.gnu.org; 29 Jul 2016 05:46:44 +0000 Original-Received: from localhost ([127.0.0.1]:49901 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bT0d9-0004vZ-2f for submit@debbugs.gnu.org; Fri, 29 Jul 2016 01:46:44 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:42402) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bT0d7-0004vO-Kf for 24091@debbugs.gnu.org; Fri, 29 Jul 2016 01:46:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bT0cx-0002ca-Ji for 24091@debbugs.gnu.org; Fri, 29 Jul 2016 01:46:36 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:55524) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bT0cx-0002an-GR; Fri, 29 Jul 2016 01:46:31 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4768 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bT0cv-0003Dm-6Q; Fri, 29 Jul 2016 01:46:29 -0400 In-reply-to: <87shut9pyk.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net) 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:121669 Archived-At: > From: npostavs@users.sourceforge.net > Date: Thu, 28 Jul 2016 21:45:55 -0400 > Cc: clement.pit@gmail.com, 24091@debbugs.gnu.org > > I guess we would like Emacs to hit this case: > > /* If on another desktop, the deiconify/map may be ignored and the > frame never becomes visible. XMonad does this. > Prevent an endless loop. */ > if (FRAME_ICONIFIED_P (f) && ++tries > 100) > break; > > But it seems that FRAME_ICONIFIED_P is returning false, because I see > that tries is never incremented. The question is: what happens if you bypass that loop and let Emacs proceed with startup? Does it successfully finish the startup, or does it error out or crash later on? If the former, we need to find a way to detect this special situation, and maybe bypass the loop altogether. If the latter, we will either need to find a way to avoid that subsequent crash, or continue waiting, perhaps with some 'usleep' call in the loop, to avoid hogging the CPU. Thanks.