GNU bug report logs -
#48841
fido-mode is slower than ido-mode with similar settings
Previous Next
Reported by: Dmitry Gutov <dgutov <at> yandex.ru>
Date: Sat, 5 Jun 2021 01:40:01 UTC
Severity: normal
Done: João Távora <joaotavora <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On Mon, Jun 14, 2021 at 1:08 AM Dmitry Gutov <dgutov <at> yandex.ru> wrote:
> Anyway, I was just describing an easier way to benchmark the same effect
> (without having to hit the key sequence very quickly). Hope you or
> someone else find it useful.
Yes. It is useful. I didn't know about benchmark-progn.
> > I could
> > investigate, but since your measurements confirm the same tendency
> > anyway, I think this simple patch is what's needed to close this issue.
>
> Haven't tested it myself, but it looks like it will almost certainly work.
>
> > diff --git a/lisp/icomplete.el b/lisp/icomplete.el
> > index 08b4ef2030..5d37f47e7d 100644
> > --- a/lisp/icomplete.el
> > +++ b/lisp/icomplete.el
> > @@ -859,13 +859,14 @@ icomplete-completions
> > (base-size (prog1 (cdr last)
> > (if last (setcdr last nil))))
> > (most-try
> > - (if (and base-size (> base-size 0))
> > - (completion-try-completion
> > - name candidates predicate (length name) md)
> > - ;; If the `comps' are 0-based, the result should be
> > - ;; the same with `comps'.
> > - (completion-try-completion
> > - name comps nil (length name) md)))
> > + (and (not fido-mode) ; Fido avoids these expensive calculations.
>
> Perhaps predicate it on the value of icomplete-hide-common-prefix instead?
>
> fido-mode sets it to nil, and this way we retain a better level of
> abstraction, and better backward compatibility for vanilla
> icomplete-mode users.
This is a good idea, the level of abstraction. But what is this
"common prefix" anyway? Is it the the same as the "determ"
thing, or the "[mplete...] dance" as I called it earlier. Shouldn't
fido-mode then _hide_ it?
I'm confused, but if you're not, go ahead and make that more
abstract change instead of relying on fido-mode.
> Next step might be switching this var's default value to nil.
Also confused, but no objections.
João
This bug report was last modified 3 years and 350 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.