Subject: Long Line Sluggishness

From: David Reitter <[email-masked]>
Date: Tue, 5 May 2009 08:44:05 -0400

Emacs becomes extremely sluggish when long lines are used.

To reproduce:
Emacs -Q
Enter long line through recursive copy/paste  (about 700k characters  
in my example)
- use vertical scrollbar to scroll to the bottom   -> doesn't work
- use End key to scroll to bottom

Now move around, enter text, scroll up, etc: everything happens with a  
substantial (0.5-1.0 seconds) delay.

For a more practical example: I was working in lisp-interaction-mode,  
typing C-j after "load-history", and expanding one of the "..."  
ellipses. This gave me a line in excess of 100k.

Similarly, users might want to edit long (mostly binary) files.  But  
maybe that's a corner case, and it would be okay to change C-j a bit  
to format the output better.

This is not a regression compared to Emacs 22 (comparing to Carbon  
port).

In GNU Emacs 23.0.92.19 (i386-apple-darwin9.6.0, NS apple-appkit-949.43)
  of 2009-04-30 on SCARLETT.PSY.CMU.EDU
Windowing system distributor `Apple', version 10.3.949
configured using `configure  '--with-ns' '--without-x' 'CFLAGS=- 
DMAC_OS_X_VERSION_MIN_REQUIRED=1040  -O3''

Important settings:
   value of $LC_ALL: nil
   value of $LC_COLLATE: en_US.US-ASCII
   value of $LC_CTYPE: en_US.US-ASCII
   value of $LC_MESSAGES: en_US.US-ASCII
   value of $LC_MONETARY: en_US.US-ASCII
   value of $LC_NUMERIC: en_US.US-ASCII
   value of $LC_TIME: en_US.US-ASCII
   value of $LANG: en_US.UTF-8
   value of $XMODIFIERS: nil
   locale-coding-system: us-ascii-unix
   default-enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
   tooltip-mode: t
   mouse-wheel-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

Recent input:
s-v s-v s-v s-v s-v s-v s-v s-v s-v s-v <wheel-up>
<double-wheel-up> <triple-wheel-up> <triple-wheel-up>
<wheel-up> <double-wheel-up> <triple-wheel-up> <triple-wheel-up>
<triple-wheel-up> s-a s-c <wheel-down> <double-wheel-down>
<triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
<triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
<triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
<triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
<triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
<triple-wheel-down> <triple-wheel-down> <down-mouse-1>
<down-mouse-1> <down-mouse-1> <down-mouse-1> <down-mouse-1>
<down-mouse-1> <down-mouse-1> <down-mouse-1> <down-mouse-1>
<down-mouse-1> <down-mouse-1> <down-mouse-1> <down-mouse-1>
<down-mouse-1> <down-mouse-1> <down-mouse-1> <down-mouse-1>
<down-mouse-1> <down-mouse-1> <down-mouse-1> <down-mouse-1>
<mouse-1> C-SPC <down-mouse-1> <down-mouse-1> <down-mouse-1>
<down-mouse-1> <down-mouse-1> <down-mouse-1> <down-mouse-1>
<down-mouse-1> <down-mouse-1> <down-mouse-1> <down-mouse-1>
<down-mouse-1> <down-mouse-1> <down-mouse-1> <down-mouse-1>
<down-mouse-1> <down-mouse-1> <down-mouse-1> <down-mouse-1>
<down-mouse-1> <down-mouse-1> <down-mouse-1> <down-mouse-1>
<down-mouse-1> <down-mouse-1> <down-mouse-1> <down-mouse-1>
<down-mouse-1> <down-mouse-1> <down-mouse-1> <down-mouse-1>
<down-mouse-1> <down-mouse-1> <down-mouse-1> <down-mouse-1>
<down-mouse-1> <down-mouse-1> <down-mouse-1> <down-mouse-1>
<down-mouse-1> <down-mouse-1> <down-mouse-1> <down-mouse-1>
<down-mouse-1> <down-mouse-1> <down-mouse-1> <down-mouse-1>
<down-mouse-1> <down-mouse-1> <down-mouse-1> <down-mouse-1>
<down-mouse-1> <down-mouse-1> <down-mouse-1> <down-mouse-1>
<down-mouse-1> <down-mouse-1> <down-mouse-1> <down-mouse-1>
<down-mouse-1> <down-mouse-1> <down-mouse-1> <down-mouse-1>
<down-mouse-1> <down-mouse-1> <down-mouse-1> <down-mouse-1>
<down-mouse-1> <down-mouse-1> <down-mouse-1> <down-mouse-1>
<down-mouse-1> <down-mouse-1> <down-mouse-1> <down-mouse-1>
<down-mouse-1> <down-mouse-1> <down-mouse-1> <down-mouse-1>
<down-mouse-1> <down-mouse-1> <down-mouse-1> <down-mouse-1>
<down-mouse-1> <down-mouse-1> <down-mouse-1> <down-mouse-1>
<down-mouse-1> <down-mouse-1> <down-mouse-1> <down-mouse-1>
<down-mouse-1> <down-mouse-1> <down-mouse-1> <down-mouse-1>
<down-mouse-1> <down-mouse-1> <down-mouse-1> <down-mouse-1>
<down-mouse-1> <down-mouse-1> <down-mouse-1> <down-mouse-1>
<down-mouse-1> <down-mouse-1> <down-mouse-1> <down-mouse-1>
<down-mouse-1> <down-mouse-1> <down-mouse-1> <down-mouse-1>
<down-mouse-1> <down-mouse-1> <down-mouse-1> <down-mouse-1>
<down-mouse-1> <down-mouse-1> <down-mouse-1> <down-mouse-1>
<down-mouse-1> <down-mouse-1> <down-mouse-1> <down-mouse-1>
<down-mouse-1> <down-mouse-1> <down-mouse-1> <down-mouse-1>
<down-mouse-1> <down-mouse-1> <down-mouse-1> <down-mouse-1>
<down-mouse-1> <down-mouse-1> <down-mouse-1> <down-mouse-1>
<down-mouse-1> <down-mouse-1> <down-mouse-1> <down-mouse-1>
<down-mouse-1> <down-mouse-1> <down-mouse-1> <down-mouse-1>
<down-mouse-1> <down-mouse-1> <down-mouse-1> <down-mouse-1>
<down-mouse-1> <down-mouse-1> <down-mouse-1> <down-mouse-1>
<down-mouse-1> <down-mouse-1> <down-mouse-1> <down-mouse-1>
<down-mouse-1> <down-mouse-1> <down-mouse-1> <down-mouse-1>
<down-mouse-1> <down-mouse-1> <down-mouse-1> <down-mouse-1>
<down-mouse-1> <down-mouse-1> <down-mouse-1> <down-mouse-1>
<down-mouse-1> <down-mouse-1> <down-mouse-1> <down-mouse-1>
<down-mouse-1> <down-mouse-1> <down-mouse-1> <down-mouse-1>
<down-mouse-1> <down-mouse-1> <down-mouse-1> <down-mouse-1>
<down-mouse-1> <down-mouse-1> <down-mouse-1> <down-mouse-1>
<down-mouse-1> <down-mouse-1> <down-mouse-1> <down-mouse-1>
<down-mouse-1> <mouse-1> <end> s-c SPC s-v SPC s-v
SPC s-v s-v s-v s-v s-v s-v s-v <wheel-up> <double-wheel-up>
<wheel-up> <double-wheel-up> <down-mouse-1> <mouse-1>
<down-mouse-1> <mouse-1> <down-mouse-1> <mouse-1> <down-mouse-1>
<mouse-1> <down-mouse-1> <mouse-1> <down-mouse-1> <mouse-1>
<wheel-up> <double-wheel-up> <wheel-up> <double-wheel-up>
<wheel-up> <double-wheel-up> <escape> x r e p o r t
- b <tab> <return>

Recent messages:
byte-code: Beginning of buffer [5 times]
byte-code: End of buffer [5 times]
byte-code: Beginning of buffer [4 times]
byte-code: End of buffer [6 times]
Mark set [114 times]
Saved text until "lled through super interpretKeyEvents:])"
byte-code: End of buffer
Mark set [2 times]
Saved text from "per interpretKeyEvents:]) <NSTextInput> "
Mark set [9 times]