From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Reitter Newsgroups: gmane.emacs.devel Subject: Redisplay: NS port, high CPU load Date: Wed, 8 Jun 2016 16:04:46 +1000 Message-ID: <9793F9E3-979A-4888-8662-F6E0C27C8B37@gmail.com> NNTP-Posting-Host: plane.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: ger.gmane.org 1465366013 16892 80.91.229.3 (8 Jun 2016 06:06:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 8 Jun 2016 06:06:53 +0000 (UTC) To: Emacs-Devel devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 08 08:06:47 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 1bAWdZ-0003Tf-Fo for ged-emacs-devel@m.gmane.org; Wed, 08 Jun 2016 08:06:45 +0200 Original-Received: from localhost ([::1]:54703 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAWdY-0004G7-8f for ged-emacs-devel@m.gmane.org; Wed, 08 Jun 2016 02:06:44 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36613) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAWbs-0002v4-2G for emacs-devel@gnu.org; Wed, 08 Jun 2016 02:05:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bAWbm-0003uo-0Y for emacs-devel@gnu.org; Wed, 08 Jun 2016 02:04:58 -0400 Original-Received: from mail-pf0-x232.google.com ([2607:f8b0:400e:c00::232]:32995) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAWbl-0003uk-La for emacs-devel@gnu.org; Wed, 08 Jun 2016 02:04:53 -0400 Original-Received: by mail-pf0-x232.google.com with SMTP id y124so25963560pfy.0 for ; Tue, 07 Jun 2016 23:04:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-transfer-encoding:subject:message-id:date:to :mime-version; bh=wp5YBr7A3O20v5NhVCsZJuT5HAzAP0wJID91rApO9lo=; b=luIwB+M+f4LLG8CcxkiAJu3eB8jRAfOa2Bk552SloYr9r6zYjijAZD87VCXwplVmLu t8tlNwYtwNgTxVgiRLjCjQBES7TYeAivxNSy438hwLn6B91RtfDSdju9XjdwegrPPCmq mchlFc6LB03JqPT8Avzke8FcpZURQWXXu50gDMsnXSIxzQ241EUYcecBgvq144VzbHvc AiOv4DXjOAkBjVCGPK9kCMSF0cJKGJz/0EpyNBswMajl6hJDaovY6uXCc2gfFMs+QuKq j53SahT5OH14GekNRIO/4DhZR/7KK9s4bBZ65HYikRtPWVuW+1meKel2FasPrDMuxIRM TmNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:content-transfer-encoding:subject :message-id:date:to:mime-version; bh=wp5YBr7A3O20v5NhVCsZJuT5HAzAP0wJID91rApO9lo=; b=RpemR2Q51pTOcn/BHK/GuSj5mKtcsH2vgSFtAarKzdYu7sHzVIqaIL6DfySt875r2J 5YzHELe9H8GG7uSO1cfrbPOLr4TayXCO30fnU8hSeSyn2rFFZ4hIub4mINXwKKjuJu/T IWz561OTKH1u/q0YY6zLTWPxynVTujjCM0qe+0zWpqzn0W88DjQcF/ZwShbDDgNrNG+0 sxLVtqrKkTdo4hkrcnKJVyzpyrSO9zIubwWYF5GdblszPzMNXVPuArNHXilZLVp9+meU kLlawnynQq7E2QeoaEVljOUeXQfwN2oyQ1dhkUpbKLwC6fPe6BvTnLJfXjNuRYIbFcoi LGyw== X-Gm-Message-State: ALyK8tK0MNV48B6jAcpsv/Pi5sTVR9TF3oyjNIvi96HUbyG2R3I1LplVgXklCvhgOZmCWw== X-Received: by 10.98.93.93 with SMTP id r90mr3912868pfb.65.1465365892288; Tue, 07 Jun 2016 23:04:52 -0700 (PDT) Original-Received: from [172.19.215.107] (events-nat.qut.edu.au. [131.181.68.31]) by smtp.gmail.com with ESMTPSA id e79sm39546408pfd.20.2016.06.07.23.04.50 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 07 Jun 2016 23:04:50 -0700 (PDT) X-Mailer: Apple Mail (2.3124) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c00::232 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:204232 Archived-At: I am and users are experiencing regular high CPU load with the NS port, = which started some time around late 2015, but according to users = co-incided with an OS upgrade, too. I tried rolling back changes, with = limited success: it does seem though that very recently, the problem has = become much worse. Usually, Emacs goes into 100% CPU load, or sometimes high load. What = invariably shows up in my process samples is NSMenu _sidebandUpdate* = (no idea what that does), within ns_upgrade_menubar. The attachment = (sorry, could not export to text) shows an example. I=E2=80=99m getting the spinning beachball sometimes when entering a = minibuffer for a command. I would like to fix this problem, but have been unsuccessful in tracing = it down. As you can see, we=E2=80=99re spending a lot of time in = redisplay. Is redisplay slow, or is it called again and again? Advice would be appreciated. (Yes, this is with Aquamacs, and I can=E2=80= =99t tell if the problem exists in GNU Emacs as it probably interacts = with some configuration.) Date/Time: 2016-06-08 15:32:29.059 +1000 Launch Time: 2016-06-08 13:51:42.364 +1000 OS Version: Mac OS X 10.11.4 (15E65) Report Version: 7 Analysis Tool: /usr/bin/sample ---- Call graph: 2484 Thread_453834: Main Thread DispatchQueue_ + 2417 start (in libdyld.dylib) + 1 [0x7fff892d35ad] + ! 2417 main () + 5602 [0x1000c3602] emacs.c:1606 + ! 2417 Frecursive_edit () + 218 [0x1000c48ea] keyboard.c:755 + ! 2417 recursive_edit_1 () + 101 [0x1000c46c5] = keyboard.c:684 + ! 2417 command_loop () + 158 [0x1000c47ae] = keyboard.c:1078 + ! 2417 internal_catch () + 54 [0x10013f6b6] eval.c:1074 + ! 2417 command_loop_2 () + 48 [0x1000d45c0] = keyboard.c:1099 + ! 2417 internal_condition_case () + 70 [0x10013fb46] = eval.c:1309 + ! 2417 command_loop_1 () + 1154 [0x1000c5552] = keyboard.c:1357 + ! 2417 read_key_sequence () + 1959 [0x1000c6e17] = keyboard.c:9101 + ! 2417 read_char () + 5783 [0x1000ca407] = keyboard.c:2706 + ! 2417 sit_for () + 261 [0x100008515] = dispnew.c:5762 + ! 1694 wait_reading_process_output () + = 1218 [0x100183482] process.c:4609 + ! : 1694 redisplay_preserve_echo_area () + = 44 [0x100028dfc] xdisp.c:14286 + ! : 970 redisplay_internal () + 2034 = [0x100027282] xdisp.c:11850 + ! : | 962 update_menu_bar () + 450 = [0x10004c9b2] xdisp.c:11960 + ! : | + 869 ns_update_menubar () + 479 = [0x1001cba6f] nsmenu.m:139 + ! : | + ! 868 -[NSApplication = setMainMenu:] (in AppKit) + 1584 [0x7fff8e8dc2c0] + ! : | + ! : 868 -[NSMenu = _addSidebandMenuUpdaterForRoles:token:priority:handler:] (in AppKit) + = 229 [0x7fff8e8dc912] + ! : | + ! : 868 -[NSMenu = _sidebandUpdaterRoles] (in AppKit) + 41,47,... = [0x7fff8e8dca4d,0x7fff8e8dca53,...] + ! : | + ! 1 -[NSApplication setMainMenu:] = (in AppKit) + 655 [0x7fff8e8dbf1f] + ! : | + ! 1 objc_msgSend (in = libobjc.A.dylib) + 26 [0x7fff8dbc54da] + ! : | + 57 ns_update_menubar () + 1577 = [0x1001cbeb9] nsmenu.m:454=