From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: [andrew.maguire@ps.ge.com: RE: menu entries missing display of equivalent keyboard sequence] Date: Wed, 29 Jan 2003 16:17:10 -0500 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <200301160013.h0G0DHP11708@rum.cs.yale.edu> <200301282250.h0SMo7M11772@rum.cs.yale.edu> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1043875025 12020 80.91.224.249 (29 Jan 2003 21:17:05 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 29 Jan 2003 21:17:05 +0000 (UTC) Cc: monnier+gnu/emacs@rum.cs.yale.edu Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18dzZw-00037f-00 for ; Wed, 29 Jan 2003 22:17:04 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18dzfH-0002AV-00 for ; Wed, 29 Jan 2003 22:22:35 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18dzb9-00073T-09 for emacs-devel@quimby.gnus.org; Wed, 29 Jan 2003 16:18:19 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18dzaT-0006t6-00 for emacs-devel@gnu.org; Wed, 29 Jan 2003 16:17:37 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18dzaG-0006dK-00 for emacs-devel@gnu.org; Wed, 29 Jan 2003 16:17:24 -0500 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18dza3-0006Qo-00 for emacs-devel@gnu.org; Wed, 29 Jan 2003 16:17:11 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.10) id 18dza2-0006cS-00; Wed, 29 Jan 2003 16:17:10 -0500 Original-To: "Stefan Monnier" In-reply-to: <200301282250.h0SMo7M11772@rum.cs.yale.edu> (monnier+gnu/emacs@rum.cs.yale.edu) Original-cc: andrew.maguire@ps.ge.com Original-cc: emacs-devel@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:11199 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:11199 - && !INTEGERP (Faref (this, make_number (0)))) + && SYMBOLP (tem = Faref (this, make_number (0))) + && !NILP (Fmemq (XCAR (parse_modifiers (tem)), Vmenu_events))) parse_modifiers is extremely expensive--it allocates space in caches. Doing this for a lot of event types unnecessarily is a bad idea. How many different non-integer prefix keys does parse_modifiers get called for here? Maybe it is few enough that this is not a real issue, but could you check? If it is indeed few enough, please add a comment saying how many it was and explaining this issue. If it is many, then I think the code should operate at a lower level.