From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Ken Raeburn Newsgroups: gmane.emacs.bugs Subject: bug#24091: 24.5; High CPU usage at startup while hidden Date: Mon, 16 Jan 2017 18:36:05 -0500 Message-ID: <1293E48B-0D9B-481C-AE7B-111B356C06BD@raeburn.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> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1484609906 1550 195.159.176.226 (16 Jan 2017 23:38:26 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 16 Jan 2017 23:38:26 +0000 (UTC) Cc: dominik.schrempf@gmail.com, npostavs@users.sourceforge.net, acairncross@gmail.com, clement.pit@gmail.com, 24091@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jan 17 00:38:20 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 1cTGqu-00081q-TZ for geb-bug-gnu-emacs@m.gmane.org; Tue, 17 Jan 2017 00:38:17 +0100 Original-Received: from localhost ([::1]:60386 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cTGqz-0005Ff-HH for geb-bug-gnu-emacs@m.gmane.org; Mon, 16 Jan 2017 18:38:21 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52969) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cTGpn-0004Nt-BT for bug-gnu-emacs@gnu.org; Mon, 16 Jan 2017 18:37:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cTGpi-0001ub-8o for bug-gnu-emacs@gnu.org; Mon, 16 Jan 2017 18:37:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:40569) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cTGpi-0001uU-55 for bug-gnu-emacs@gnu.org; Mon, 16 Jan 2017 18:37:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cTGph-0000aD-Q6 for bug-gnu-emacs@gnu.org; Mon, 16 Jan 2017 18:37:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ken Raeburn Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 16 Jan 2017 23:37: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.14846097782187 (code B ref 24091); Mon, 16 Jan 2017 23:37:01 +0000 Original-Received: (at 24091) by debbugs.gnu.org; 16 Jan 2017 23:36:18 +0000 Original-Received: from localhost ([127.0.0.1]:55968 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cTGp0-0000ZD-FM for submit@debbugs.gnu.org; Mon, 16 Jan 2017 18:36:18 -0500 Original-Received: from mail-qt0-f194.google.com ([209.85.216.194]:34670) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cTGoy-0000Yz-MP for 24091@debbugs.gnu.org; Mon, 16 Jan 2017 18:36:17 -0500 Original-Received: by mail-qt0-f194.google.com with SMTP id a29so17557645qtb.1 for <24091@debbugs.gnu.org>; Mon, 16 Jan 2017 15:36:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raeburn-org.20150623.gappssmtp.com; s=20150623; h=subject:mime-version:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=5Npo85RCLQsohMLJkhZsOn7TgBxJPMEMm2OaaRJayiY=; b=yPSoWmlfUpQ3oJNu2nU1ikYOJ12rgGWmjBHpockk2DEkkPawq8Tmc5xs1ZiY+75bdr T8Px/241VY83FzDd/eMgZh6PDmJqdTGwm2ZsqpD4D243XDRwRo+ISSyCqqOF13PbtsJN ugwV8ScCi7K906ClgavUtrpZ2t0lVsl0Ims4s5cqqPbQ0gDnau5O3R6Nzj/KNE1L60c/ NBmkTd6qEFIOcfurJUcJmmJOK08RGN1LioRYgevgRWMTdF7O47M7ShXOSpkLmKDHOntk OGEgvpk0zWxrRyuBdKNpUanGawDLsyilAPfSBm8xGF1nbJv3ZuUTog7VEkFP6k4phsMW Tjow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=5Npo85RCLQsohMLJkhZsOn7TgBxJPMEMm2OaaRJayiY=; b=aLSD253IuFpSLOejqo0dMdZBf1iOR2ZWDFnxMuyxQAf1vld6hHByho5I5ydPgr8DAs TA1/VtGfVs98wDYa5oBPpBAriwwIhckZsE1uL9jQONEpVdqvdOio46NIkB1mCSQ2G/Lt pN4EHjibYqeYX+9dUbji70oE8QOEQVJ4lLXlyvHWDIewJZJJueASOP0125y7sBQCvcjx k7TeKrwYYLHQd8C9D5QINWc8xGeoFzNlqtC9r1sSnufG1FQEY4Ul6y9B2nal4wmvnsJm jdZ9um715NbNEYrbbSDZotvNwDnbfhG9xG9PrB/Fo9qjvky/rpAXsgHmIg6SUfQFEYBJ dX3Q== X-Gm-Message-State: AIkVDXJIpUFMi+9o+nlhZElc6jpmLA9GO9PCG/QCUkFw+GpIC/v42HT3TLKWm3cYkOEGyA== X-Received: by 10.55.111.2 with SMTP id k2mr36534010qkc.138.1484609771047; Mon, 16 Jan 2017 15:36:11 -0800 (PST) Original-Received: from [192.168.23.52] (c-50-138-183-136.hsd1.ma.comcast.net. [50.138.183.136]) by smtp.gmail.com with ESMTPSA id c1sm748172qke.36.2017.01.16.15.36.09 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 16 Jan 2017 15:36:10 -0800 (PST) In-Reply-To: <83pojqaxjc.fsf@gnu.org> X-Mailer: Apple Mail (2.3124) 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:128158 Archived-At: On Jan 14, 2017, at 02:52, Eli Zaretskii wrote: >> From: npostavs@users.sourceforge.net >> Cc: Eli Zaretskii , 24091@debbugs.gnu.org, = acairncross@gmail.com, clement.pit@gmail.com >> Date: Fri, 13 Jan 2017 20:38:02 -0500 >>=20 >> We left things inconclusive, but revisiting this now, I see no reason >> against simply removing this waiting loop: >=20 > 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. >=20 > But maybe I'm wrong. Ken, can you comment on this, please? As I understand it, from the function=E2=80=99s comments and stuff = I=E2=80=99ve 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=E2=80=99s 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=E2=80=99t any more if we remove the loop. Given that we = should redraw things on expose events anyway, I=E2=80=99m not sure it'll = matter, unless someone=E2=80=99s 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=E2=80=99s probably = worth trying it to see if any differences are noticed under any of the = environments people are using. Ken=