From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Redisplay: NS port, high CPU load Date: Fri, 10 Jun 2016 13:22:34 +0300 Message-ID: <83fuslpclx.fsf@gnu.org> 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> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1465554776 4003 80.91.229.3 (10 Jun 2016 10:32:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 10 Jun 2016 10:32:56 +0000 (UTC) Cc: alan@idiocy.org, andlind@gmail.com, emacs-devel@gnu.org To: David Reitter Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jun 10 12:32:55 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 1bBJkD-0001fy-4i for ged-emacs-devel@m.gmane.org; Fri, 10 Jun 2016 12:32:53 +0200 Original-Received: from localhost ([::1]:39610 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bBJk8-0003YI-Vm for ged-emacs-devel@m.gmane.org; Fri, 10 Jun 2016 06:32:49 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41340) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bBJZd-0003V2-8h for emacs-devel@gnu.org; Fri, 10 Jun 2016 06:21:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bBJZa-0003n9-04 for emacs-devel@gnu.org; Fri, 10 Jun 2016 06:21:57 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:55220) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bBJZZ-0003mx-TM; Fri, 10 Jun 2016 06:21:53 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4458 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bBJZX-0008El-L4; Fri, 10 Jun 2016 06:21:52 -0400 In-reply-to: (message from David Reitter on Fri, 10 Jun 2016 19:46:01 +1000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:204270 Archived-At: > From: David Reitter > Date: Fri, 10 Jun 2016 19:46:01 +1000 > Cc: andlind@gmail.com, > alan@idiocy.org, > emacs-devel@gnu.org > > >> Also, I would suggest to check whether code like this should indeed trigger an update_frame_tool_bar. > >> > >> (with-temp-buffer > >> (insert "XXX")) > > > > I don't think so. It doesn't here. How did you check that it does on > > your system? > > Enable NSTRACE in nsterm.h, specifically for updates. > > Run an observe output. Observe that the above causes an update to the toolbar, unlike evaluating other expressions. If by "evaluating expression" you mean something like C-j or M-:, then they might trigger redisplay regardless of the expression they evaluate. 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