From: Le Wang <l26wang@gmail.com>
To: "Óscar Fuentes" <ofv@wanadoo.es>
Cc: Leo Liu <sdl.web@gmail.com>, emacs-devel@gnu.org
Subject: Re: fix for bug 10994 breaks ido customizations in major way
Date: Sat, 4 May 2013 21:00:15 +0800 [thread overview]
Message-ID: <CAM=K+ioT66Mvx1h6goi9py6vHCPNo6iX5yEY7dCN=cAnNd61WA@mail.gmail.com> (raw)
In-Reply-To: <87ip2zm89w.fsf@wanadoo.es>
[-- Attachment #1.1: Type: text/plain, Size: 605 bytes --]
On Sat, May 4, 2013 at 4:58 PM, Óscar Fuentes <ofv@wanadoo.es> wrote:
> This change introduces a serious slowdown which is noticeable for large
> candidate lists (try with 10000 elements.) The slowdown happens on every
> invocation.
>
> It is obvious that having duplicate candidates makes no sense, but at
> the same time scanning the list in advance for all duplicates is
> expensive.
The only way to introduce list with dupes is ido-completing-read (i.e. it's
not an issue for files and buffers), so I think it's okay to remove dupes
just once on entry.
Patch atached.
--
Le
[-- Attachment #1.2: Type: text/html, Size: 1083 bytes --]
[-- Attachment #2: ido-remove-dups2.diff --]
[-- Type: application/octet-stream, Size: 814 bytes --]
diff --git a/lisp/ido.el b/lisp/ido.el
index bedf00e..15e280e 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -3159,8 +3159,7 @@ Use `eq' for comparison."
(sofar nil))
(while (not ret)
(setq next (car items))
- ;; Use `eq' to avoid bug http://debbugs.gnu.org/10994
- (if (eq next elem)
+ (if (equal next elem)
(setq ret (append items (nreverse sofar)))
;; else
(progn
@@ -4795,7 +4794,7 @@ DEF, if non-nil, is the default value."
(ido-directory-nonreadable nil)
(ido-directory-too-big nil)
(ido-context-switch-command 'ignore)
- (ido-choice-list choices))
+ (ido-choice-list (delete-dups choices)))
;; Initialize ido before invoking ido-read-internal
(ido-common-initialization)
(ido-read-internal 'list prompt hist def require-match initial-input)))
next prev parent reply other threads:[~2013-05-04 13:00 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-02 17:57 fix for bug 10994 breaks ido customizations in major way Le Wang
2013-05-03 4:13 ` Leo Liu
2013-05-03 12:49 ` Le Wang
2013-05-03 20:33 ` Leo Liu
2013-05-04 7:00 ` Le Wang
2013-05-04 8:58 ` Óscar Fuentes
2013-05-04 13:00 ` Le Wang [this message]
2013-05-05 10:57 ` Óscar Fuentes
2013-05-05 11:39 ` Leo Liu
2013-05-05 12:20 ` Óscar Fuentes
2013-05-05 12:58 ` Leo Liu
2013-05-05 13:38 ` Óscar Fuentes
2013-05-05 14:31 ` Stephen J. Turnbull
2013-05-05 15:26 ` Óscar Fuentes
2013-05-06 15:11 ` Le Wang
2013-05-06 22:49 ` Vitalie Spinu
2013-05-07 1:01 ` Óscar Fuentes
2013-05-07 9:35 ` Le Wang
2013-05-07 10:26 ` Vitalie Spinu
2013-05-07 10:35 ` Óscar Fuentes
2013-05-07 14:49 ` Le Wang
2013-05-07 21:18 ` Stefan Monnier
2013-05-07 14:42 ` Le Wang
2013-05-07 14:44 ` Drew Adams
2013-05-07 14:47 ` Le Wang
2013-05-07 19:00 ` Vitalie Spinu
2013-05-07 19:53 ` Óscar Fuentes
2013-05-08 0:04 ` Leo Liu
2013-05-08 0:35 ` Le Wang
2013-05-08 3:10 ` Leo Liu
2013-05-08 3:29 ` Leo Liu
2013-05-08 4:49 ` Leo Liu
2013-05-08 8:14 ` Vitalie Spinu
2013-05-08 8:42 ` Leo Liu
2013-05-08 12:23 ` Le Wang
2013-05-08 14:29 ` Leo Liu
2013-05-08 20:56 ` Juri Linkov
2013-05-10 1:52 ` Leo Liu
2013-05-17 2:48 ` Leo Liu
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+ioT66Mvx1h6goi9py6vHCPNo6iX5yEY7dCN=cAnNd61WA@mail.gmail.com' \
--to=l26wang@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=ofv@wanadoo.es \
--cc=sdl.web@gmail.com \
/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.