From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Anders Lindgren Newsgroups: gmane.emacs.devel Subject: Re: Redisplay: NS port, high CPU load Date: Mon, 13 Jun 2016 20:44:15 +0200 Message-ID: References: <9793F9E3-979A-4888-8662-F6E0C27C8B37@gmail.com> <20160608195552.GA66865@breton.holly.idiocy.org> <7B0CAF99-689D-4128-8E33-7D9BA8F1823E@gmail.com> <41E503B6-5048-4E20-92CE-1FAD4C05A279@gmail.com> <525668A8-4B0E-4791-A423-F1D4903F4511@gmail.com> <83lh2dpetr.fsf@gnu.org> <83fuslpclx.fsf@gnu.org> <62E0B0C4-4D9B-4E1C-ACE5-06E674C8A342@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=94eb2c1246107cc08105352d46e3 X-Trace: ger.gmane.org 1465843473 3500 80.91.229.3 (13 Jun 2016 18:44:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 13 Jun 2016 18:44:33 +0000 (UTC) Cc: Eli Zaretskii , Alan Third , emacs-devel To: David Reitter Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jun 13 20:44:32 2016 Return-path: Envelope-to: ged-emacs-devel@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 1bCWqb-0000z2-Az for ged-emacs-devel@m.gmane.org; Mon, 13 Jun 2016 20:44:29 +0200 Original-Received: from localhost ([::1]:58639 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCWqa-0005ko-F7 for ged-emacs-devel@m.gmane.org; Mon, 13 Jun 2016 14:44:28 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43711) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCWqU-0005iT-5a for emacs-devel@gnu.org; Mon, 13 Jun 2016 14:44:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bCWqS-0001c6-0F for emacs-devel@gnu.org; Mon, 13 Jun 2016 14:44:21 -0400 Original-Received: from mail-vk0-x236.google.com ([2607:f8b0:400c:c05::236]:32812) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCWqO-0001bd-Rc; Mon, 13 Jun 2016 14:44:16 -0400 Original-Received: by mail-vk0-x236.google.com with SMTP id d185so66687015vkg.0; Mon, 13 Jun 2016 11:44:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=8CWjZdlImmoLgU2mPEf1vYXC2yuIgJcq9pWVPDJavpc=; b=rHYqdnEqT79Dbqe/+mOi9y4Zz0ghAsQ3Ft+1HCkcqkp1bysaufCtYx1sa3JHgl1sTv dztNK6MT9hiYy8C9MC9F0Zu9UTPfj+wbwlrOlzMz7196kA0k2uq+ktwpIRC7vkuRfLjo N9QJTaFQppbi6LqCQ5tmFyBO8z+LqN6K1xmYqvFD79ffCzHKk+LyB5mwy7HfPY7ldUvT ftTuuCY5O6wUAcZ/w5SQ6m0AcdgevY8EOhTwAhSK/ptgfpC3Op/AId0A3+QfNHOKekeV FYoMIv72XYRL38oC0swVDepazXI7C4lNxGEMHuZJYXvCymLxWiiDzKc7bHq3iSR+tw3j V/0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=8CWjZdlImmoLgU2mPEf1vYXC2yuIgJcq9pWVPDJavpc=; b=eiHcmsMevX9Vsd9nz9oK9fHN7Qeh8toQTlXOMm2LzGegaeviXUDAxZTXhTg5ktWADc Ia5ROEaOngSEBWyw0KSM91zMvEXMk9VMW4MxZriyZA+nVmvIFOvgf/FawtujlohUO2MT fGwpJsitCChWnoEUwrFs9zBvi4gCpMK5IUrntSn1A1YKuVkULmddnMUoScbbiZ5cFD1Z IyxP9X9BY9tx4Fg/ScTIvYRd3aLtcQeqwhWHYoGC8bZRlAKYhh2Iiw0+yyGhVuONxEg9 QK48G11mKvISoTN48qrYmAdRpssaoO9i2JVAtSHPQWRaLRUDDa2wG+TK/rxIe6Vs+70a 2ZgQ== X-Gm-Message-State: ALyK8tKtt9LGVv8uE+bIvTAjcHx6041IE95UeO5K6KlZbGtNjUHBYTuImXdscjyuWgjkO/P6fEvvOTN8HX+Dcw== X-Received: by 10.176.64.167 with SMTP id i36mr6177963uad.60.1465843455931; Mon, 13 Jun 2016 11:44:15 -0700 (PDT) Original-Received: by 10.31.216.195 with HTTP; Mon, 13 Jun 2016 11:44:15 -0700 (PDT) In-Reply-To: <62E0B0C4-4D9B-4E1C-ACE5-06E674C8A342@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400c:c05::236 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:204341 Archived-At: --94eb2c1246107cc08105352d46e3 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi! Unfortunately, I can't reproduce this either, but I have a theory on what is going on. `with-temp-buffer' calls `generate-new-buffer'. This, in turn calls `get-buffer-create', which run `buffer-list-update-hook'. In theory, if a function on this hook would trigger a tool-bar redisplay, `(with-temp-buffer (insert "XXX"))' will too. If this is the cause of the problem David is seeing, one solution would be to temporarily bind `buffer-list-update-hook' to nil in `with-temp-buffer'. (This might be a good idea anyway, since we don't want `with-temp-buffer' to be slowed down by slow hooks, unless is it more important to ensure that the buffer list is up to date?) When it comes to the HFS coding rewrite, I still think it is valid. The documentation of `define-coding-system' indicated that it expects the pre-write function to convert the current buffer and that the two parameters are only there for backward compatibility. The function, before the rewrite, was clearly written for an older version of `define-coding-system'. -- Anders On Fri, Jun 10, 2016 at 12:36 PM, David Reitter wrote: > On Jun 10, 2016, at 8:22 PM, Eli Zaretskii wrote: > > > To be sure this triggers redisplay of the tool bar, you need: > > > > . emacs -Q > > . disable blink-cursor-mode > > . disable global-eldoc-mode > > . define an interactive function that does the above insertion, and > > then bind that function to a key (I used F8) > > . press F8 and see if update_frame_tool_bar is called > > > Well, turns out this happens with -q, but not with -Q. > > If I clear tool-bar-map, the update goes away, but running populating it > with a standard toolbar as per (tool-bar-setup), the updates come back. > So, I=E2=80=99m not sure what exactly makes this happen - I=E2=80=99m obv= iously loading a > whole lot of settings with -q. > > I=E2=80=99m assuming I=E2=80=99ll have to give you something more reprodu= cible then, so > please stand by. > > > --94eb2c1246107cc08105352d46e3 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi!

Unfortunately, I can't re= produce this either, but I have a theory on what is going on.

`with-temp-buffer' calls `generate-new-buffer'. This, in turn= calls `get-buffer-create', which run `buffer-list-update-hook'. In= theory, if a function on this hook would trigger a tool-bar redisplay, `(w= ith-temp-buffer (insert "XXX"))' will too.

If this is the cause of the problem David is seeing, one solution wo= uld be to temporarily bind `buffer-list-update-hook' to nil in `with-te= mp-buffer'. (This might be a good idea anyway, since we don't want = `with-temp-buffer' to be slowed down by slow hooks, unless is it more i= mportant to ensure that the buffer list is up to date?)

When it comes to the HFS coding rewrite, I still think it is valid. T= he documentation of `define-coding-system' indicated that it expects th= e pre-write function to convert the current buffer and that the two paramet= ers are only there for backward compatibility. The function, before the rew= rite, was clearly written for an older version of `define-coding-system'= ;.

=C2=A0 =C2=A0 -- Anders


On Fri, Jun 10= , 2016 at 12:36 PM, David Reitter <david.reitter@gmail.com> wrote:
On Jun 10, = 2016, at 8:22 PM, Eli Zaretskii <eliz@gn= u.org> wrote:

> To be sure this triggers redisplay of the tool bar, you need:
>
>=C2=A0 . emacs -Q
>=C2=A0 . disable blink-cursor-mode
>=C2=A0 . disable global-eldoc-mode
>=C2=A0 . define an interactive function that does the above insertion, = and
>=C2=A0 =C2=A0 then bind that function to a key (I used F8)
>=C2=A0 . press F8 and see if update_frame_tool_bar is called


Well, turns out this happens with -q, but not with -Q.

If I clear tool-bar-map, the update goes away, but running populating it wi= th a standard toolbar as per (tool-bar-setup), the updates come back.
So, I=E2=80=99m not sure what exactly makes this happen - I=E2=80=99m obvio= usly loading a whole lot of settings with -q.

I=E2=80=99m assuming I=E2=80=99ll have to give you something more reproduci= ble then, so please stand by.



--94eb2c1246107cc08105352d46e3--