helm-flx icon indicating copy to clipboard operation
helm-flx copied to clipboard

Unify highlighting and sorting

Open PythonNut opened this issue 10 years ago • 1 comments

Currently, flx-score is called twice on each candidate, once for highlighting and once for sorting. This is obviously not ideal.

It would be nice to find a way to reuse the result of the scoring for both passes. This should lead to a ~2x performance improvement. Unfortunately, this is difficult because the two passes are very strongly abstracted from each other. This will likely take a deep dive into helm's source code.

PythonNut avatar Jan 06 '16 17:01 PythonNut

I see two ways of doing this:

  1. Cache the result in a text property attached to the candidate.
  2. Find a root helm function and let bind the cache variable there.

PythonNut avatar Feb 02 '16 03:02 PythonNut