Subject: 24.2; PostScript file with long lines locks up UI

From: Andreas Gustafsson <[email-masked]>
Date: Mon, 17 Feb 2014 23:34:00 +0200

Hi,

I have a PostScript source file containing some embedded font data
in the form of a single line about 100,000 characters long.

When I open this file in emacs, it stops responding to keystrokes
(including control-G) for several minutes, consuming 100% CPU.

I see this behavior in 22.2.1, 23.4.1, and 24.2.1, but not in 21.4.1.

The problem can be reproduced by evaluating the following elisp
expression:

  (progn
    (switch-to-buffer "test")
    (insert (make-string 100000 97))
    (ps-mode)
  )

-- 
Andreas Gustafsson, [email-masked]

In GNU Emacs 24.2.1 (x86_64--netbsd)
 of 2012-10-12 on pomegranate.tastylime.net
Configured using:
 `configure '--srcdir=/scratch/editors/emacs24-nox11/work/emacs-24.2'
 '--localstatedir=/var' '--without-dbus' '--without-m17n-flt'
 '--without-otf' '--without-rsvg' '--without-x' '--without-xft'
 '--without-gif' '--without-jpeg' '--without-png' '--without-tiff'
 '--without-xpm' '--prefix=/usr/pkg' '--build=x86_64--netbsd'
 '--host=x86_64--netbsd' '--infodir=/usr/pkg/info'
 '--mandir=/usr/pkg/man' 'build_alias=x86_64--netbsd'
 'host_alias=x86_64--netbsd' 'CC=gcc' 'CFLAGS=-O2 -I/usr/include'
 'LDFLAGS=-L/usr/lib -Wl,-R/usr/lib -Wl,-R/usr/pkg/lib' 'LIBS='
 'CPPFLAGS=-DTERMINFO -I/usr/include''

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: nil
  value of $XMODIFIERS: nil
  locale-coding-system: nil
  default enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
ESC [ ? 1 ; 2 c ESC x r e p o r TAB RET

Recent messages:
("emacs")
Customizing...
Done.
For information about GNU Emacs and the GNU system, type C-h C-a.

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr warnings emacsbug message format-spec
rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils time-date guess-offset cc-vars
cc-defs regexp-opt ediff-hook vc-hooks lisp-float-type lisp-mode
register page menu-bar rfn-eshadow timer jit-lock font-lock syntax
facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak
czech european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces
cus-face files text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget hashtable-print-readable backquote
make-network-process multi-tty emacs)