emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] master d9c4427 69/90: Improve performance for "^" initial input


From: Oleh Krehel
Subject: [elpa] master d9c4427 69/90: Improve performance for "^" initial input
Date: Tue, 30 Jun 2015 07:29:12 +0000

branch: master
commit d9c4427330d47b38199082796f8a522d56d10d1c
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    Improve performance for "^" initial input
    
    ivy.el (ivy--filter): There's no need to anchor when the previous regex
    is "^" (matches everything). The result will be index 0 anyway, but
    without this optimization it can be slow for ~30k candidates.
---
 ivy.el |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/ivy.el b/ivy.el
index 07b84c3..58d57ea 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1242,7 +1242,7 @@ CANDIDATES are assumed to be static."
                      res))))
          (tail (nthcdr ivy--index ivy--old-cands))
          idx)
-    (when (and tail ivy--old-cands)
+    (when (and tail ivy--old-cands (not (equal "^" ivy--old-re)))
       (unless (and (not (equal re ivy--old-re))
                    (or (setq ivy--index
                              (or



reply via email to

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