[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: address@hidden: RE: menu entries missing display of equivalent keybo
From: |
Stefan Monnier |
Subject: |
Re: address@hidden: RE: menu entries missing display of equivalent keyboard sequence] |
Date: |
Thu, 30 Jan 2003 10:21:28 -0500 |
> - && !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.
My quick experiment indicates that the number of symbols whose cache
is filled is increased by a bit more than 10% (from 618 to 689
in my test case, which was rather conservative).
The experiment was to start Emacs, open an elisp buffer, a TeX buffer,
a PCL-CVS buffer and a *vc-diff* buffer, open up a menu in each one of
them (to cause the `where-is' thingy to happen) and then count the
number of symbols that have the event-symbol-element-mask property set.
> 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?
I don't know if 70 is few enough.
Stefan