all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Le Wang <l26wang@gmail.com>
To: "Óscar Fuentes" <ofv@wanadoo.es>
Cc: emacs-devel@gnu.org
Subject: Re: flx -- flex with better sorting
Date: Thu, 2 May 2013 00:26:47 +0800	[thread overview]
Message-ID: <CAM=K+ioeK+VT2yi0RXfnWeVZdcJgkGDVtxYjV8_72g-_18FUwA@mail.gmail.com> (raw)
In-Reply-To: <87ip32ofdn.fsf@wanadoo.es>

[-- Attachment #1: Type: text/plain, Size: 2231 bytes --]

On Thu, May 2, 2013 at 12:04 AM, Óscar Fuentes <ofv@wanadoo.es> 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

[-- Attachment #2: Type: text/html, Size: 3972 bytes --]

  reply	other threads:[~2013-05-01 16:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-01 15:01 flx -- flex with better sorting Le Wang
2013-05-01 16:04 ` Óscar Fuentes
2013-05-01 16:26   ` Le Wang [this message]
2013-05-01 17:04     ` Óscar Fuentes
2013-05-01 17:27       ` Le Wang
2013-05-01 18:16         ` Óscar Fuentes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAM=K+ioeK+VT2yi0RXfnWeVZdcJgkGDVtxYjV8_72g-_18FUwA@mail.gmail.com' \
    --to=l26wang@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=ofv@wanadoo.es \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.