aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2020-12-11 18:58:41 +0100
committerLars Ingebrigtsen2020-12-11 18:58:41 +0100
commitb04f322a9bd0e5376eca0d4c2961a8a076eeb9bb (patch)
tree2d197bf21285dcdf58880d0b40036d80195e0b00
parentc7c261ebdf0232cc9263e8f8cbcc851a933076e0 (diff)
downloademacs-b04f322a9bd0e5376eca0d4c2961a8a076eeb9bb.tar.gz
emacs-b04f322a9bd0e5376eca0d4c2961a8a076eeb9bb.zip
Also sort the totals section by size
* lisp/emacs-lisp/memory-report.el (memory-report): Sort the totals by size, too.
-rw-r--r--lisp/emacs-lisp/memory-report.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/memory-report.el b/lisp/emacs-lisp/memory-report.el
index 0184c7ed8a5..c88d9f2768a 100644
--- a/lisp/emacs-lisp/memory-report.el
+++ b/lisp/emacs-lisp/memory-report.el
@@ -59,7 +59,9 @@ by counted more than once."
59 (if (listp report) 59 (if (listp report)
60 (push report summaries) 60 (push report summaries)
61 (push report details))) 61 (push report details)))
62 (dolist (summary (nreverse summaries)) 62 (dolist (summary (seq-sort (lambda (e1 e2)
63 (> (cdr e1) (cdr e2)))
64 summaries))
63 (insert (format "%s %s\n" 65 (insert (format "%s %s\n"
64 (memory-report--format (cdr summary)) 66 (memory-report--format (cdr summary))
65 (car summary)))) 67 (car summary))))