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

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

[elpa] externals/dict-tree 45270bc 144/154: Cache all queries, not just


From: Stefan Monnier
Subject: [elpa] externals/dict-tree 45270bc 144/154: Cache all queries, not just those with named function arguments.
Date: Mon, 14 Dec 2020 12:22:03 -0500 (EST)

branch: externals/dict-tree
commit 45270bc43a50cc96c314b7c79ae4724b09f94e22
Author: Toby S. Cubitt <toby-predictive@dr-qubit.org>
Commit: Toby S. Cubitt <toby-predictive@dr-qubit.org>

    Cache all queries, not just those with named function arguments.
---
 dict-tree.el | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/dict-tree.el b/dict-tree.el
index 0a366fe..25f2639 100644
--- a/dict-tree.el
+++ b/dict-tree.el
@@ -2603,13 +2603,13 @@ to its constituent dicts."
 
       ;; if there's a cache entry with enough results, use it
       (if (and cachefun
-              (or (symbolp rank-function)
-                  ;; can be '(t . rankfun) for `dictree-fuzzy-complete'
-                  (and (consp rank-function)
-                       (symbolp (car rank-function))
-                       (symbolp (cdr rank-function))))
-              (symbolp filter)
-              (symbolp pfxfilter)
+              ;; (or (symbolp rank-function)
+              ;;          ;; can be '(t . rankfun) for `dictree-fuzzy-complete'
+              ;;          (and (consp rank-function)
+              ;;               (symbolp (car rank-function))
+              ;;               (symbolp (cdr rank-function))))
+              ;; (symbolp filter)
+              ;; (symbolp pfxfilter)
               (setq cache (funcall cachefun dic))
               (setq cache-entry
                     (gethash (list args rank-function reverse filter pfxfilter)
@@ -2634,13 +2634,13 @@ to its constituent dicts."
          (setq time (- (float-time) time))
          ;; if we're above the dictionary's cache threshold, cache the result
          (when (and cachefun (not no-cache)
-                    (or (symbolp rank-function)
-                        ;; can be '(t . rankfun) for `dictree-fuzzy-complete'
-                        (and (consp rank-function)
-                             (symbolp (car rank-function))
-                             (symbolp (cdr rank-function))))
-                    (symbolp filter)
-                    (symbolp pfxfilter)
+                    ;; (or (symbolp rank-function)
+                    ;;          ;; can be '(t . rankfun) for 
`dictree-fuzzy-complete'
+                    ;;          (and (consp rank-function)
+                    ;;               (symbolp (car rank-function))
+                    ;;               (symbolp (cdr rank-function))))
+                    ;; (symbolp filter)
+                    ;; (symbolp pfxfilter)
                     (dictree--above-cache-threshold-p
                      time (length (car args)) (dictree-cache-policy dic)
                      (dictree-cache-threshold dic) cache-long))



reply via email to

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