From: Lars Ingebrigtsen Date: Fri, 11 Dec 2020 17:58:41 +0000 (+0100) Subject: Also sort the totals section by size X-Git-Tag: emacs-28.0.90~4779 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b04f322a9bd0e5376eca0d4c2961a8a076eeb9bb;p=emacs.git Also sort the totals section by size * lisp/emacs-lisp/memory-report.el (memory-report): Sort the totals by size, too. --- 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." (if (listp report) (push report summaries) (push report details))) - (dolist (summary (nreverse summaries)) + (dolist (summary (seq-sort (lambda (e1 e2) + (> (cdr e1) (cdr e2))) + summaries)) (insert (format "%s %s\n" (memory-report--format (cdr summary)) (car summary))))