* bug#960: 23.0.60; excess consing
@ 2008-09-11 11:03 Richard M. Stallman
2008-09-11 12:25 ` Juanma Barranquero
0 siblings, 1 reply; 3+ messages in thread
From: Richard M. Stallman @ 2008-09-11 11:03 UTC (permalink / raw
To: emacs-pretest-bug
In emacs -Q, I defined these functions to measure consing:
(defun gc-set-base ()
(interactive)
(setq base-cons-cells-consed cons-cells-consed)
(setq base-strings-consed strings-consed)
(setq base-string-chars-consed string-chars-consed)
(setq base-vector-cells-consed vector-cells-consed)
(setq base-symbols-consed symbols-consed)
(setq base-misc-objects-consed misc-objects-consed)
(setq base-intervals-consed intervals-consed))
(defun gc-info ()
(interactive)
(message "C=%s S=%s(%s) V=%s SYM=%s MISC=%s INT=%s"
(- cons-cells-consed base-cons-cells-consed)
(- strings-consed base-strings-consed)
(- string-chars-consed base-string-chars-consed)
(- vector-cells-consed base-vector-cells-consed)
(- symbols-consed base-symbols-consed)
(- misc-objects-consed base-misc-objects-consed)
(- intervals-consed base-intervals-consed)))
(global-set-key [?\M-*] 'gc-info)
Just typing M-* repeatedly I see that cons-cells-consed increases by
about 130, and string-chars-consed increases by around 160. This seems
unreasonably much, for running a command that does no consing itself.
In GNU Emacs 23.0.60.6 (mipsel-unknown-linux-gnu, GTK+ Version 2.12.11)
of 2008-09-10 on lemote-menglan
configured using `configure 'CFLAGS=-O0 -g -Wno-pointer-sign' 'mipsel-unknown-linux-gnu' 'build_alias=mipsel-unknown-linux-gnu' 'host_alias=mipsel-unknown-linux-gnu' 'target_alias=mipsel-unknown-linux-gnu''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: en_US.UTF-8
value of $XMODIFIERS: nil
locale-coding-system: utf-8-unix
default-enable-multibyte-characters: t
Major mode: Emacs-Lisp
Minor modes in effect:
gpm-mouse-mode: t
tooltip-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
global-auto-composition-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
abbrev-mode: t
Recent input:
n SPC g c - b a s e SPC ( ) RET C-u C-y TAB ESC C-f
RET ESC C-f RET ESC C-f RET ESC C-f RET TAB C-p C-p
C-p C-p TAB C-n TAB C-n C-k TAB n TAB DEL C-n TAB C-n
TAB ESC C-f RET TAB C-u C-p C-u C-p C-n C-n C-a C-x
ESC m C-g C-x ( ESC m C-k C-y ESC m ( s e t q SPC b
a s e - C-e SPC C-y ) C-a C-n C-x ) C-u C-x e C-x e
C-x e C-p C-e ) C-a C-p C-p C-p C-p C-p C-p C-@ C-u
C-n C-n C-n C-n ESC w C-u C-p C-u C-p C-p C-o C-u C-y
C-p C-@ C-u C-n C-u C-n C-n C-w C-u C-n C-u C-n C-n
C-n C-n C-n C-n C-u C-y C-k C-x ( TAB C-f ESC d - ESC
C-f ESC C-t C-a C-n C-x ) C-u C-x e e e C-p C-e ) C-n
C-n C-p C-@ C-n C-n C-n C-n C-w C-u C-u C-p C-u C-p
C-n ESC f ESC f - s e t C-a C-n C-o TAB i j DEL DEL
( i n t e r a c t v e DEL DEL i v e ) ESC C-x ESC x
g c - s e TAB RET ESC * C-u C-n C-u C-n C-u C-n ESC
C-x ESC * ESC * ESC * ESC * ESC * ESC * ESC * ESC *
ESC * ESC * ESC * ESC * ESC * ESC * ESC * C-a C-u C-u
C-p C-n C-n C-@ C-u C-u C-n C-u C-n C-n C-n ESC w C-x
4 C-g ESC x r e p o r SPC e m a c s SPC b u g RET
Recent messages:
C=1185 S=173(1763) V=0 SYM=1 MISC=95 INT=0
Auto-saving...
C=1290 S=192(44027) V=0 SYM=1 MISC=102 INT=0
C=1369 S=204(44160) V=0 SYM=1 MISC=109 INT=0
C=1448 S=216(44293) V=0 SYM=1 MISC=115 INT=0
C=1527 S=228(44426) V=0 SYM=1 MISC=121 INT=0
C=1606 S=240(44559) V=0 SYM=1 MISC=127 INT=0
C=1685 S=252(44692) V=0 SYM=1 MISC=133 INT=0
C=1764 S=264(44825) V=0 SYM=1 MISC=139 INT=0
Mark set
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#960: 23.0.60; excess consing
2008-09-11 11:03 bug#960: 23.0.60; excess consing Richard M. Stallman
@ 2008-09-11 12:25 ` Juanma Barranquero
2008-09-12 8:52 ` Richard M. Stallman
0 siblings, 1 reply; 3+ messages in thread
From: Juanma Barranquero @ 2008-09-11 12:25 UTC (permalink / raw
To: rms, 960
On Thu, Sep 11, 2008 at 13:03, Richard M. Stallman <rms@gnu.org> wrote:
> (defun gc-info ()
> (interactive)
> (message "C=%s S=%s(%s) V=%s SYM=%s MISC=%s INT=%s"
> Just typing M-* repeatedly I see that cons-cells-consed increases by
> about 130, and string-chars-consed increases by around 160. This seems
> unreasonably much, for running a command that does no consing itself.
`message' calls `format', which calls `copy-sequence'... Isn't that a
source of consing?
Juanma
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#960: 23.0.60; excess consing
2008-09-11 12:25 ` Juanma Barranquero
@ 2008-09-12 8:52 ` Richard M. Stallman
0 siblings, 0 replies; 3+ messages in thread
From: Richard M. Stallman @ 2008-09-12 8:52 UTC (permalink / raw
To: Juanma Barranquero, 960; +Cc: bug-gnu-emacs
`message' calls `format', which calls `copy-sequence'... Isn't that a
source of consing?
That seems to account for most of it. I made another command
that accumulates data in a list, and it showed very little
consing.
This shows that calling `message' does a lot more consing than it
ought to need to do. But this may not be significant for the great
consing-related slowness I see.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-09-12 8:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-11 11:03 bug#960: 23.0.60; excess consing Richard M. Stallman
2008-09-11 12:25 ` Juanma Barranquero
2008-09-12 8:52 ` Richard M. Stallman
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.