From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Adrian Robert Newsgroups: gmane.emacs.devel Subject: Re: NeXTStep port: slowness, etc. Date: Wed, 16 Jul 2008 12:29:20 +0000 (UTC) Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1216212767 1815 80.91.229.12 (16 Jul 2008 12:52:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 16 Jul 2008 12:52:47 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 16 14:53:35 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KJ6Ux-0007If-6U for ged-emacs-devel@m.gmane.org; Wed, 16 Jul 2008 14:52:47 +0200 Original-Received: from localhost ([127.0.0.1]:35979 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KJ6U4-000295-QX for ged-emacs-devel@m.gmane.org; Wed, 16 Jul 2008 08:51:52 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KJ6Tv-000222-3H for emacs-devel@gnu.org; Wed, 16 Jul 2008 08:51:43 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KJ6Tt-0001z2-Gn for emacs-devel@gnu.org; Wed, 16 Jul 2008 08:51:41 -0400 Original-Received: from [199.232.76.173] (port=48658 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KJ6Tt-0001yV-Aq for emacs-devel@gnu.org; Wed, 16 Jul 2008 08:51:41 -0400 Original-Received: from main.gmane.org ([80.91.229.2]:41415 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KJ68W-0001jP-B5 for emacs-devel@gnu.org; Wed, 16 Jul 2008 08:29:36 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1KJ68T-000632-2W for emacs-devel@gnu.org; Wed, 16 Jul 2008 12:29:33 +0000 Original-Received: from dpc67142130035.direcpc.com ([67.142.130.35]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 16 Jul 2008 12:29:33 +0000 Original-Received: from Adrian.B.Robert by dpc67142130035.direcpc.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 16 Jul 2008 12:29:33 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 40 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: main.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 67.142.130.35 (Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US) AppleWebKit/523 (KHTML, like Gecko, Safari/523.10) OmniWeb/v621.0.99313) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:100805 Archived-At: David Reitter gmail.com> writes: > > I'm experiencing a delay of almost one second when accessing on menus, > i.e. there is a long lag between clicking on a menu title and the menu > actually showing up. That shouldn't be. This is due to this change: 2008-07-15 Stefan Monnier * keyboard.c (parse_menu_item): Don't use cachelist, even under NS. If the cache doesn't work, let's fix it, rather than work around it. This is the right thing to do, but it means some significant work may be needed to recover normal performance. When I looked into this, my best guess was that further optimization needed to be done in the ns menu code. ns_update_menubar() from line 108 in nsmenu.m. I did my best to follow other terms as closely as possible, and even optimize more than they do, but something is wrong somewhere. Also see comment on line 242. There is some profiling code that can be enabled. It could also be that the problem has not to do with nsmenu.m, but something with the way other code is leading to the calling of ns_update_menubar(). Either something of the new cache referred to in keyboard.c is hit differently by the NS port for some reason, or ns_update_menubar() is called in some different pattern. I spent some time on this but could not get any further -- it might be another pair of eyes can see what I'm missing. BTW, the "incremental" mouse highlighting you mention has been there for a while, another thing I could not track down. Again, NS handles this identically to other terms as far as I've been able to tell, but there must be a difference somewhere..