emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: (describe-function 'self-insert-command) takes too long


From: Drew Adams
Subject: RE: (describe-function 'self-insert-command) takes too long
Date: Sun, 15 Oct 2006 11:48:17 -0700

    RMS:
    There is no clean way to find out that a command has a lot of bindings
    other than to find them all.  We could add one, but it would be more
    trouble than it is worth.

    It is easy to add a special-case check for self-insert-command.
    How about this?

It's OK by me, but Kim's point is a valid one that a different command might
in some contexts be substituted for self-insert-command. Anyway, I like it.

    Stefan:
    Any such optimization would have to be at the cost of more complex code.
    So there's always a trade-off between optimizing and keeping
    code maintainable.  In this specific case, you're talking about an
    optimization that is only useful in 1 particular case, whereas the usual
    rule is "optimize only the common case".

self-insert-command is itself an exception. Its number of bindings is way
beyond compare. Yes, describe-function might not be called for
self-insert-command often. The response time is excellent in all cases but
this one.

I don't know if this is a good idea, but one thing that might help is a
message "Gathering bindings..." or some such - something to prevent users
from wondering if anything is happening (e.g. whether they in fact clicked
correctly etc.). Again, I'm not sure that is a good idea; it's just a
thought.

    Of course, maybe there's a way to solve your problem without
    making the code less maintainable, but it seems you're the only one
    with enough motivation to do it, so if you provide a patch for it,
    we may consider it for inclusion, but otherwise I think the problem
    will stay unsolved.

GNU will not accept my patches, because my employer will not sign the
papers.

I would have expected that the loop that looks up the key bindings could be
interrupted after a certain number were found. It sounds like you are all
saying  that that is not possible (or at least not easy or not clean). Too
bad.

Thanks for responding to the bug report, in any case.







reply via email to

[Prev in Thread] Current Thread [Next in Thread]