From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?utf-8?Q?=C3=93scar_Fuentes?= Newsgroups: gmane.emacs.devel Subject: Re: flx -- flex with better sorting Date: Wed, 01 May 2013 18:04:52 +0200 Message-ID: <87ip32ofdn.fsf@wanadoo.es> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1367424307 10729 80.91.229.3 (1 May 2013 16:05:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 1 May 2013 16:05:07 +0000 (UTC) Cc: emacs-devel@gnu.org To: Le Wang Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 01 18:05:07 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UXZWj-000886-Hd for ged-emacs-devel@m.gmane.org; Wed, 01 May 2013 18:05:05 +0200 Original-Received: from localhost ([::1]:55854 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UXZWj-0002ZP-32 for ged-emacs-devel@m.gmane.org; Wed, 01 May 2013 12:05:05 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:41334) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UXZWe-0002YB-QM for emacs-devel@gnu.org; Wed, 01 May 2013 12:05:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UXZWc-0007Ge-R1 for emacs-devel@gnu.org; Wed, 01 May 2013 12:05:00 -0400 Original-Received: from impaqm2.telefonica.net ([213.4.138.18]:48213 helo=telefonica.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UXZWc-0007G5-F1 for emacs-devel@gnu.org; Wed, 01 May 2013 12:04:58 -0400 Original-Received: from IMPmailhost2.adm.correo ([10.20.102.39]) by IMPaqm2.telefonica.net with bizsmtp id WfKX1l00B0r0BT63Ng4vow; Wed, 01 May 2013 18:04:55 +0200 Original-Received: from qcore ([83.40.116.149]) by IMPmailhost2.adm.correo with BIZ IMP id Wg4s1l00F3DUQuj1ig4tYh; Wed, 01 May 2013 18:04:53 +0200 X-CMAE-Analysis: v=1.1 cv=VX9xJAn9xOxHJcks8bX6w7MHmm093F1wQZggtrLy5KI= c=1 sm=1 a=DQlLCnKHR5QA:10 a=vaN8wkIYCq8A:10 a=sSE9TqpJnXXWdi4WNHITQg==:17 a=pGLkceISAAAA:8 a=NEAV23lmAAAA:8 a=yn19wHT6AAAA:20 a=g06wJ2M3NtRfvalL4-sA:9 a=MSl-tDqOz04A:10 a=sSE9TqpJnXXWdi4WNHITQg==:117 X-original-sender: 981711563@telefonica.net In-Reply-To: (Le Wang's message of "Wed, 1 May 2013 23:01:13 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 213.4.138.18 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:159244 Archived-At: Le Wang writes: > I've put up my implementation of Sublime Text 2's fuzzy matching -- i.e. > ido's flex with superior sorting. https://github.com/lewang/flx > > I've made a screencast (5 min) of rationale and workflow. > http://www.youtube.com/watch?v=_swuJ1RuMgk > > I have signed assignment papers, and would be willing to contribute it to > Emacs. So please check it out and point out any inefficiencies in my > algorithms. >From trying it for a few minutes with ido: 1. I like it. Looks much better that ido's flex matching. 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. 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. 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). Furthermore, when inputting `ltx8', matching letters on candidates are highlighted like this: lib/Target/X86/X86TargetTransformInfo.cpp ^ ^ ^^ It ignores the first occurrence of `X8'. 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.