From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#24091: 24.5; High CPU usage at startup while hidden Date: Sat, 3 Sep 2016 14:40:23 -0400 Message-ID: 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> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1472928089 24427 195.159.176.226 (3 Sep 2016 18:41:29 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 3 Sep 2016 18:41:29 +0000 (UTC) Cc: Aiken , =?UTF-8?Q?Cl=C3=A9ment?= Pit--Claudel , 24091@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Sep 03 20:41:25 2016 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 1bgFsT-00057b-Ed for geb-bug-gnu-emacs@m.gmane.org; Sat, 03 Sep 2016 20:41:17 +0200 Original-Received: from localhost ([::1]:47414 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bgFsR-0006Ub-6o for geb-bug-gnu-emacs@m.gmane.org; Sat, 03 Sep 2016 14:41:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38523) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bgFsK-0006TQ-KA for bug-gnu-emacs@gnu.org; Sat, 03 Sep 2016 14:41:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bgFsE-0001OU-Qv for bug-gnu-emacs@gnu.org; Sat, 03 Sep 2016 14:41:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:51221) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bgFsE-0001OO-NW for bug-gnu-emacs@gnu.org; Sat, 03 Sep 2016 14:41:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bgFsE-0000Y7-BT for bug-gnu-emacs@gnu.org; Sat, 03 Sep 2016 14:41:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 03 Sep 2016 18:41: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.14729280312065 (code B ref 24091); Sat, 03 Sep 2016 18:41:02 +0000 Original-Received: (at 24091) by debbugs.gnu.org; 3 Sep 2016 18:40:31 +0000 Original-Received: from localhost ([127.0.0.1]:48933 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bgFrj-0000XF-31 for submit@debbugs.gnu.org; Sat, 03 Sep 2016 14:40:31 -0400 Original-Received: from mail-oi0-f44.google.com ([209.85.218.44]:35659) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bgFrh-0000X1-Ig for 24091@debbugs.gnu.org; Sat, 03 Sep 2016 14:40:29 -0400 Original-Received: by mail-oi0-f44.google.com with SMTP id p186so167294135oia.2 for <24091@debbugs.gnu.org>; Sat, 03 Sep 2016 11:40:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=5q7OdVn8lDZQPMcDeoMNB5imCx08pKYO7x29BzpjCFw=; b=QwjngPAlODHWgKpmKFcz+XB7kH3wEcJHVfkn/MupY79hh7cl6RzXPBUZ/lMPtmhex1 4/E1LtPP06/ImpcyeLXCSXs3+6U1b0VofaXXoNBqtprj5hC01UMLqQfA2Y4E8NETVMtI x9GDB375b1kXX9ujn9LlqewwP90nKsu5McVnU8dadrzdPV1ilLfDrUSO3n/7i3P8na7w 20ISBRsftTN6U+5xScHb/vnZUoAxgzyWxpHsIvAEYX2RASB3HUYjXuC267rzBVcEtb2F 5sCKHHVIeudPOTKiCxHOsBiNVTby06Bz+NYk39oNulAf0WoIU28LKqNBXL0D9OWDNIqJ 7LsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=5q7OdVn8lDZQPMcDeoMNB5imCx08pKYO7x29BzpjCFw=; b=CqRamKiulnIDkr0IHpo1JvWemXsFnHzVfb10TUQPrjh7cR+gMMFU1PfrR3AOJnan1N T6rQLtlpiR1BlCZDCTQIz09jth7hyFfMi6EuQi2vJtjUf6fV0uyvuqiJT06Ul840x0lm pBtA2A7j6AKaz3RcsxSS7HeJklG/1uQoz9ef42VFdHoNQn3Fp8ucGAhY/W4CZzyNNg6t KR3Lod/d2HB8yoYQDU481I8hY+gRFPcEh6BfgPy9Qy6U8XBtg03ka9zZfwLPoZnYe6R/ TI79rjI5dPsTTvAUBEEcXr5gOdjJR08NgEw6+BII3XH3Z8OeXKq0do960d28d2hD2Q32 t8oA== X-Gm-Message-State: AE9vXwONhhVctJwKrBigAdqdvFpnGhMyt7XrYAWhg6HO0NUIBUDRwAvbRV3rQr/OhBNFQTH1tlN5F9eNGyWu2g== X-Received: by 10.202.93.197 with SMTP id r188mr23022220oib.88.1472928024045; Sat, 03 Sep 2016 11:40:24 -0700 (PDT) Original-Received: by 10.157.7.195 with HTTP; Sat, 3 Sep 2016 11:40:23 -0700 (PDT) In-Reply-To: <83y438de6m.fsf@gnu.org> X-Google-Sender-Auth: _FfhyJS6L9LZ_VsWoauaFuC0K0o 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:122901 Archived-At: On Sat, Sep 3, 2016 at 2:35 PM, Eli Zaretskii wrote: >> From: Noam Postavsky >> Date: Sat, 3 Sep 2016 13:53:40 -0400 >> Cc: 24091@debbugs.gnu.org, Aiken , >> Cl=C3=A9ment Pit--Claudel >> >> >> Emacs is getting PropertyNotify, ConfigureNotify, MapNotify, and >> >> ReparentNotify events. >> > >> > Does it work to turn this: >> > >> > if (FRAME_ICONIFIED_P (f) && ++tries > 100) >> > break; >> > >> > into this: >> > >> > if ((FRAME_ICONIFIED_P (f) || FRAME_VISIBLE_P (f)) && ++tries= > 100) >> > break; >> >> No, which sort of makes sense since the frame isn't actually visible. > > But you said the MapNotify event was received? Doesn't that cause the > frame to become marked as visible? Only if x_top_window_to_frame returns non-nil, which it does not. case MapNotify: /* We use x_top_window_to_frame because map events can come for sub-windows and they don't mean that the frame is visible. */ f =3D x_top_window_to_frame (dpyinfo, event->xmap.window); if (f) { ... SET_FRAME_VISIBLE (f, 1); ... } goto OTHER;