emacs-devel
[Top][All Lists]
Advanced

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

Re: flx -- flex with better sorting


From: Le Wang
Subject: Re: flx -- flex with better sorting
Date: Thu, 2 May 2013 00:26:47 +0800

On Thu, May 2, 2013 at 12:04 AM, Óscar Fuentes <address@hidden> wrote:
From trying it for a few minutes with ido:

1. I like it. Looks much better that ido's flex matching.

Thanks. 

2. Working with 10500 candidate files, there is a noticeable pause the
   first time ido-complete is invoked. I'm using a reasonably fast
   machine and the pause is not annoying, but that perception may change
   when using less capable machines.

Yep, it's adding these candidates to the cached hash.
 
3. With the same set of candidates, RES memory jumps from 35 MB to 70 MB
   on first use (on a 64 bit GNU/Linux machine). This is a more serious
   concern.

Yep.  I mentioned this in my first thread that the algorithm trades memory usage for speed.  I'm not sure how to optimize this part.
 
4. Sometimes it fails to work as advertised. For instance, if I type
   `ltx' this file is shown first on the list of matches:

lib/Target/NVPTX/NVPTXLowerAggrCopies.h

but I would expect

lib/Target/X86/* (* meaning any file under that subdirectory).

1. The algorithm favors basepaths heavily.
2. I ended up considering all capitals to be beginning of word.

This means ltx is matching as expected.  As you supply more letters, better results should float to the top.
 
I made a helm demo that shows scoring of each match.  If you're curious, just replace the hardcoded list of files with your own list and run it through helm.  (btw, helm integration still doesn't work)

Furthermore, when inputting `ltx8', matching letters on candidates are
highlighted like this:

lib/Target/X86/X86TargetTransformInfo.cpp
^   ^          ^^

It ignores the first occurrence of `X8'.

The letters that made the best score is highlighted.  See: favoring basename.
 
5. Another quirk is that it rejects capital letters. For instance, if I
   type `lT' it shows no matches, but in fact there are lots of files
   like this:

lib/Target/...

Actually, typing just `T' fails to find any candidate, but there are
lots files with a capital T on its name.

I hadn't considered people might do this.  :-)  Will fix soon.


--
Le

reply via email to

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