mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 22:41:06 -08:00
* lisp/emacs-lisp/memory-report.el (memory-report--object-size-1): Simplify
This commit is contained in:
parent
be75b08f82
commit
c42dc493d1
1 changed files with 9 additions and 9 deletions
|
|
@ -182,7 +182,7 @@ by counted more than once."
|
||||||
|
|
||||||
(cl-defmethod memory-report--object-size-1 (_ (value symbol))
|
(cl-defmethod memory-report--object-size-1 (_ (value symbol))
|
||||||
;; Don't count global symbols -- makes sizes of lists of symbols too
|
;; Don't count global symbols -- makes sizes of lists of symbols too
|
||||||
;; heavey.
|
;; heavy.
|
||||||
(if (intern-soft value obarray)
|
(if (intern-soft value obarray)
|
||||||
0
|
0
|
||||||
(memory-report--size 'symbol)))
|
(memory-report--size 'symbol)))
|
||||||
|
|
@ -214,14 +214,14 @@ by counted more than once."
|
||||||
(setf (gethash value counted) t)
|
(setf (gethash value counted) t)
|
||||||
(when (car value)
|
(when (car value)
|
||||||
(cl-incf total (memory-report--object-size counted (car value))))
|
(cl-incf total (memory-report--object-size counted (car value))))
|
||||||
(if (cdr value)
|
(let ((next (cdr value)))
|
||||||
(if (consp (cdr value))
|
(setq value (when next
|
||||||
(if (gethash (cdr value) counted)
|
(if (consp next)
|
||||||
(setq value nil)
|
(unless (gethash next counted)
|
||||||
(setq value (cdr value)))
|
(cdr value))
|
||||||
(cl-incf total (memory-report--object-size counted (cdr value)))
|
(cl-incf total (memory-report--object-size
|
||||||
(setq value nil))
|
counted next))
|
||||||
(setq value nil)))
|
nil)))))
|
||||||
total))
|
total))
|
||||||
|
|
||||||
(cl-defmethod memory-report--object-size-1 (counted (value vector))
|
(cl-defmethod memory-report--object-size-1 (counted (value vector))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue