|
From: | Dmitry Gutov |
Subject: | bug#12796: Optimize `ido-completing-read' for larger lists with flex matching enabled |
Date: | Sun, 04 Nov 2012 09:58:35 +0400 |
User-agent: | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121026 Thunderbird/16.0.2 |
Tags: patchCurrently ido re-filters the full candidates list after every change in the minibuffer. With long candidates list and with flex matching enabled (like it's often the case with certain third-party packages, namely smex and ido-ubiquitous), as soon as ido switches to using flex matching, each update takes a noticeable fraction of a second. Even if there's no matches anymore for the current input.
If I decide to type quickly but make a typo in one of the first characters, I often need to wait a few seconds until I can fix the typo or start anew.
This patch adds a simple cache that keeps track of the current matching settings (prefix, regexp, or no), and checks the input against a previously entered string. If the latter is a prefix of the former (and regexp matching is disabled), then we can use the matches from the former input as the candidates list for the current one.
Any objections?
ido-speed.diff
Description: Text document
[Prev in Thread] | Current Thread | [Next in Thread] |