[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dict-tree 8d8ce4f 120/154: Print dict-tree cache sizes
From: |
Stefan Monnier |
Subject: |
[elpa] externals/dict-tree 8d8ce4f 120/154: Print dict-tree cache sizes in edebug. |
Date: |
Mon, 14 Dec 2020 12:21:58 -0500 (EST) |
branch: externals/dict-tree
commit 8d8ce4f33766e38c0dae9d39fe5e73b92ac16a46
Author: Toby S. Cubitt <toby-predictive@dr-qubit.org>
Commit: Toby S. Cubitt <toby-predictive@dr-qubit.org>
Print dict-tree cache sizes in edebug.
---
dict-tree.el | 46 ++++++++++++++++++++++++++++++++++++++++++----
1 file changed, 42 insertions(+), 4 deletions(-)
diff --git a/dict-tree.el b/dict-tree.el
index c040c22..5668ff3 100644
--- a/dict-tree.el
+++ b/dict-tree.el
@@ -52,6 +52,10 @@
;; according to any other desired ranking. The results can also be limited to
;; a given number of matches.
;;
+;; These sophisticated string queries are fast even for very large dict-trees,
+;; and dict-tree's also cache query results (and automatically keep these
+;; caches synchronised) to speed up queries even further.
+;;
;; Other functions allow you to:
;;
;; - create dict-tree stack objects, which allow efficient access to the
@@ -63,9 +67,12 @@
;; - map over all strings in alphabetical order
;; (`dictree-mapc', `dictree-mapcar' and `dictree-mapf')
;;
-;; These sophisticated string queries are fast even for very large dict-trees,
-;; and dict-tree's also cache query results (and automatically keep these
-;; caches synchronised) to speed up queries even further.
+;; Dict-trees can be combined together into a "meta dict-tree", which combines
+;; the data from identical keys in its constituent dict-trees, in whatever way
+;; you specify (`dictree-create-meta-dict'). Any number of dict-trees can be
+;; combined in this way. Meta-dicts behave *exactly* like dict-trees: all of
+;; the above functions work on meta-dicts as well as dict-trees, and
+;; meta-dicts can themselves be used in new meta-dicts.
;;
;; The package also provides persistent storage of dict-trees to file.
;; (`dictree-save', `dictree-write', `dictee-load')
@@ -3782,7 +3789,38 @@ extension, suitable for passing to `load-library'."
(defun dictree--edebug-pretty-print (object)
(cond
((dictree-p object)
- (concat "#<dict-tree \"" (dictree-name object) "\">"))
+ (concat "#<dict-tree \"" (dictree-name object) "\""
+ (if (dictree--lookup-cache object)
+ (concat " lookup "
+ (prin1-to-string
+ (hash-table-count
+ (dictree--lookup-cache object))))
+ "")
+ (if (dictree--complete-cache object)
+ (concat " complete "
+ (prin1-to-string
+ (hash-table-count
+ (dictree--complete-cache object))))
+ "")
+ (if (dictree--regexp-cache object)
+ (concat " regexp "
+ (prin1-to-string
+ (hash-table-count
+ (dictree--regexp-cache object))))
+ "")
+ (if (dictree--fuzzy-match-cache object)
+ (concat " fuzzy-match "
+ (prin1-to-string
+ (hash-table-count
+ (dictree--fuzzy-match-cache object))))
+ "")
+ (if (dictree--fuzzy-complete-cache object)
+ (concat " fuzzy-complete "
+ (prin1-to-string
+ (hash-table-count
+ (dictree--fuzzy-complete-cache object))))
+ "")
+ ">"))
((null object) "nil")
((let ((dlist object) (test t))
(while (or (dictree-p (car-safe dlist))
- [elpa] externals/dict-tree cfdc73d 099/154: Fixed calls to dictree-create-meta-dict., (continued)
- [elpa] externals/dict-tree cfdc73d 099/154: Fixed calls to dictree-create-meta-dict., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 2a1d749 098/154: Minor change to package description, to match other data structure packages., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 7ab8f94 095/154: Updated copyright attribution and license (GPL2 -> GPL3)., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 09b388f 108/154: Add note to self to use cust-print pretty-printing instead of advice., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree d96b1c5 097/154: More minor whitespace and commentary changes., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 1ec9d58 102/154: Restore trie print/read transformer functions., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 48ab389 092/154: Simplified persistent-storage code for tries and dict-trees., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 454c68b 109/154: Code cleanup., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree ba2eba0 107/154: Exploit lexical closures to allow byte-compilation of wrapped functions., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 08303f3 103/154: Remove ChangeLogs from library headers., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 8d8ce4f 120/154: Print dict-tree cache sizes in edebug.,
Stefan Monnier <=
- [elpa] externals/dict-tree 84b23ec 112/154: Implement trie-fuzzy-match and trie-fuzzy-complete functions., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 5321c25 113/154: Implement fuzzy match and completion on dict-trees., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree d0e339d 117/154: Don't wrap rank and filter functions for regexp and fuzzy queries., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree a11f2a5 115/154: Update predictive mode to new dictree-create function interface., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 217c9d2 119/154: Updated Commentary., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 95d6a5a 127/154: Mention iterator generators in Commentary., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree d84725e 124/154: Bump version numbers since we've added iterator generators., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree f47d49c 137/154: Bug fixes to meta-dict fuzzy-matching/completing., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 65b94b4 131/154: Bump version numbers., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree c737d3a 134/154: Make use of new trie-fuzzy-complete facilities., Stefan Monnier, 2020/12/14