emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] master b0e318d 2/2: Score flex-style completions accor


From: Dmitry Gutov
Subject: Re: [Emacs-diffs] master b0e318d 2/2: Score flex-style completions according to match tightness
Date: Mon, 18 Mar 2019 16:26:58 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1

On 17.03.2019 23:46, João Távora wrote:

Another thing I'd like to note: with flex completion, RET doesn't select
the current candidate anymore (working as intended, of course). But it's
a bit disorienting.

In what situation exactly? Emacs -Q + (setq completion-styles '(flex)) + what?

+ input is not a prefix match. E.g. M-x describe-variable, then input 'compst'. RET won't select the completion.

You're right, more or less, at least judging from some benchmarks:

(benchmark-run-compiled 100
   (let ((completion-styles '(flex)))
     (completion-all-completions "kill" obarray nil 0))) ; => 4.76s

(benchmark-run-compiled 100
   (let ((completion-styles '(basic)))
     (completion-all-completions "kill" obarray nil 0))) ; => 3.7s

... and the first returns a much larger list.

Try a smaller input, like just 'k'. The difference is more stark in that case, and the lists of completions are longer.

For the same reason (lots of matches), I'm afraid simply moving matching to C won't bring a noticeable improvement.

I was expecting to see much larger differences, though, since my
icomplete and company-based experience is really sluggish. But
I wasn't using these much for the default completion style anyway.
Or maybe the sluggishness is coming from somewhere else.

Anyway, as I predicted, most of the work is the matching in
completion-pcm--all-completions.  I'll try to hack something
there when the pattern has some simple flex-like form.

All right. Please let us know of the results.



reply via email to

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