helm-flx
helm-flx copied to clipboard
Unify highlighting and sorting
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.
I see two ways of doing this:
- Cache the result in a text property attached to the candidate.
- Find a root helm function and
letbind the cache variable there.