GNU bug report logs - #11943
24.1.50; Emacs unusably slow when looking at large files (bidi support at fault)

Previous Next

Package: emacs;

Reported by: Dima Kogan <dima <at> secretsauce.net>

Date: Sun, 15 Jul 2012 00:57:01 UTC

Severity: normal

Found in version 24.1.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 11943 in the body.
You can then email your comments to 11943 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#11943; Package emacs. (Sun, 15 Jul 2012 00:57:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dima Kogan <dima <at> secretsauce.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 15 Jul 2012 00:57:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Dima Kogan <dima <at> secretsauce.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.1.50;
	Emacs unusably slow when looking at large files (bidi support at
	fault)
Date: Sat, 14 Jul 2012 17:50:51 -0700
I'm observing that when some large text files are loaded, emacs slows to
a crawl. As an example, I have a 14MB file open (with emacs -Q). Every
time I do (next-line) or (previous-line) it takes a few seconds. This is
a > 2GHz Core2 machine, so there's no reason for this to happen. 'M-x
benchmark' says that (previous-line) takes >2s each time. I discovered
that if I do (setq bidi-display-reordering nil) then emacs is snappy
again, with previous-line taking <1ms.

The specific file I'm using to exhibit the bug consists of many repeated
stanzas such as

=========================
{
 {2.222222,2.222222,2.222222,2.2},
 {-2.222222,2.222222,2.222222},
 {-22.222222,22.222222,2.222222}
},
=========================

without the =. Saving a stanza into a file called 'snippet', the 14MB
file can be made with

$ for i in `seq 17`; do cat snippet snippet > xxx; mv xxx snippet; done

Thanks.


In GNU Emacs 24.1.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.4.2)
 of 2012-06-29 on zelenka, modified by Debian
 (emacs-snapshot package, version 2:20120629-1)
Windowing system distributor `The X.Org Foundation', version 11.0.11201902
Configured using:
 `configure '--build' 'x86_64-linux-gnu' '--host' 'x86_64-linux-gnu'
 '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib'
 '--localstatedir=/var' '--infodir=/usr/share/info'
 '--mandir=/usr/share/man' '--with-pop=yes'
 '--enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/24.1.50/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.1.50/site-lisp:/usr/share/emacs/site-lisp'
 '--without-compress-info' '--with-crt-dir=/usr/lib/x86_64-linux-gnu/'
 '--with-x=yes' '--with-x-toolkit=gtk3' '--with-imagemagick=yes'
 'build_alias=x86_64-linux-gnu' 'host_alias=x86_64-linux-gnu'
 'CFLAGS=-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2' 'LDFLAGS=-g
 -Wl,--as-needed -znocombreloc' 'CPPFLAGS=-D_FORTIFY_SOURCE=2''

Important settings:
  value of $LC_ALL: C
  value of $LANG: C
  locale-coding-system: nil
  default enable-multibyte-characters: t

Major mode: Fundamental

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

Recent input:
y <down> <down> <down> <down> <down> <down> <up> M-x 
b e n c h m a r k <return> ( p r e v i o u s - l i 
n e ) <return> <help-echo> <help-echo> M-x r e p o 
r t SPC b u g <return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
File snippet is large (13.1M), really open? (y or n)  y
Elapsed time: 2.232054s

Load-path shadows:
/usr/share/emacs/24.1.50/site-lisp/cscope/xcscope hides /usr/share/emacs/site-lisp/xcscope
/usr/share/emacs/24.1.50/site-lisp/cmake-data/cmake-mode hides /usr/share/emacs/site-lisp/cmake-mode
/usr/share/emacs/24.1.50/site-lisp/easypg/epg hides /usr/share/emacs/24.1.50/lisp/epg
/usr/share/emacs/24.1.50/site-lisp/easypg/epa-dired hides /usr/share/emacs/24.1.50/lisp/epa-dired
/usr/share/emacs/24.1.50/site-lisp/easypg/epg-config hides /usr/share/emacs/24.1.50/lisp/epg-config
/usr/share/emacs/24.1.50/site-lisp/easypg/epa hides /usr/share/emacs/24.1.50/lisp/epa
/usr/share/emacs/24.1.50/site-lisp/easypg/epa-file hides /usr/share/emacs/24.1.50/lisp/epa-file
/usr/share/emacs/24.1.50/site-lisp/easypg/epa-mail hides /usr/share/emacs/24.1.50/lisp/epa-mail
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-list hides /usr/share/emacs/24.1.50/lisp/org/org-list
/usr/share/emacs/24.1.50/site-lisp/org-mode/ob-screen hides /usr/share/emacs/24.1.50/lisp/org/ob-screen
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-protocol hides /usr/share/emacs/24.1.50/lisp/org/org-protocol
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-footnote hides /usr/share/emacs/24.1.50/lisp/org/org-footnote
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-docview hides /usr/share/emacs/24.1.50/lisp/org/org-docview
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-pcomplete hides /usr/share/emacs/24.1.50/lisp/org/org-pcomplete
/usr/share/emacs/24.1.50/site-lisp/org-mode/ob-sh hides /usr/share/emacs/24.1.50/lisp/org/ob-sh
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-irc hides /usr/share/emacs/24.1.50/lisp/org/org-irc
/usr/share/emacs/24.1.50/site-lisp/org-mode/ob-maxima hides /usr/share/emacs/24.1.50/lisp/org/ob-maxima
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-mac-message hides /usr/share/emacs/24.1.50/lisp/org/org-mac-message
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-bibtex hides /usr/share/emacs/24.1.50/lisp/org/org-bibtex
/usr/share/emacs/24.1.50/site-lisp/org-mode/ob-asymptote hides /usr/share/emacs/24.1.50/lisp/org/ob-asymptote
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-bbdb hides /usr/share/emacs/24.1.50/lisp/org/org-bbdb
/usr/share/emacs/24.1.50/site-lisp/org-mode/ob hides /usr/share/emacs/24.1.50/lisp/org/ob
/usr/share/emacs/24.1.50/site-lisp/org-mode/ob-lilypond hides /usr/share/emacs/24.1.50/lisp/org/ob-lilypond
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-exp-blocks hides /usr/share/emacs/24.1.50/lisp/org/org-exp-blocks
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-icalendar hides /usr/share/emacs/24.1.50/lisp/org/org-icalendar
/usr/share/emacs/24.1.50/site-lisp/org-mode/ob-gnuplot hides /usr/share/emacs/24.1.50/lisp/org/ob-gnuplot
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-src hides /usr/share/emacs/24.1.50/lisp/org/org-src
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-w3m hides /usr/share/emacs/24.1.50/lisp/org/org-w3m
/usr/share/emacs/24.1.50/site-lisp/org-mode/ob-css hides /usr/share/emacs/24.1.50/lisp/org/ob-css
/usr/share/emacs/24.1.50/site-lisp/org-mode/ob-ledger hides /usr/share/emacs/24.1.50/lisp/org/ob-ledger
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-wl hides /usr/share/emacs/24.1.50/lisp/org/org-wl
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-mew hides /usr/share/emacs/24.1.50/lisp/org/org-mew
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-mks hides /usr/share/emacs/24.1.50/lisp/org/org-mks
/usr/share/emacs/24.1.50/site-lisp/org-mode/ob-python hides /usr/share/emacs/24.1.50/lisp/org/ob-python
/usr/share/emacs/24.1.50/site-lisp/org-mode/ob-shen hides /usr/share/emacs/24.1.50/lisp/org/ob-shen
/usr/share/emacs/24.1.50/site-lisp/org-mode/ob-tangle hides /usr/share/emacs/24.1.50/lisp/org/ob-tangle
/usr/share/emacs/24.1.50/site-lisp/org-mode/ob-haskell hides /usr/share/emacs/24.1.50/lisp/org/ob-haskell
/usr/share/emacs/24.1.50/site-lisp/org-mode/ob-eval hides /usr/share/emacs/24.1.50/lisp/org/ob-eval
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-rmail hides /usr/share/emacs/24.1.50/lisp/org/org-rmail
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-habit hides /usr/share/emacs/24.1.50/lisp/org/org-habit
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-exp hides /usr/share/emacs/24.1.50/lisp/org/org-exp
/usr/share/emacs/24.1.50/site-lisp/org-mode/ob-mscgen hides /usr/share/emacs/24.1.50/lisp/org/ob-mscgen
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-gnus hides /usr/share/emacs/24.1.50/lisp/org/org-gnus
/usr/share/emacs/24.1.50/site-lisp/org-mode/ob-plantuml hides /usr/share/emacs/24.1.50/lisp/org/ob-plantuml
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-ascii hides /usr/share/emacs/24.1.50/lisp/org/org-ascii
/usr/share/emacs/24.1.50/site-lisp/org-mode/ob-octave hides /usr/share/emacs/24.1.50/lisp/org/ob-octave
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-entities hides /usr/share/emacs/24.1.50/lisp/org/org-entities
/usr/share/emacs/24.1.50/site-lisp/org-mode/ob-dot hides /usr/share/emacs/24.1.50/lisp/org/ob-dot
/usr/share/emacs/24.1.50/site-lisp/org-mode/ob-latex hides /usr/share/emacs/24.1.50/lisp/org/ob-latex
/usr/share/emacs/24.1.50/site-lisp/org-mode/ob-java hides /usr/share/emacs/24.1.50/lisp/org/ob-java
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-indent hides /usr/share/emacs/24.1.50/lisp/org/org-indent
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-table hides /usr/share/emacs/24.1.50/lisp/org/org-table
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-eshell hides /usr/share/emacs/24.1.50/lisp/org/org-eshell
/usr/share/emacs/24.1.50/site-lisp/org-mode/ob-org hides /usr/share/emacs/24.1.50/lisp/org/ob-org
/usr/share/emacs/24.1.50/site-lisp/org-mode/ob-exp hides /usr/share/emacs/24.1.50/lisp/org/ob-exp
/usr/share/emacs/24.1.50/site-lisp/org-mode/ob-keys hides /usr/share/emacs/24.1.50/lisp/org/ob-keys
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-install hides /usr/share/emacs/24.1.50/lisp/org/org-install
/usr/share/emacs/24.1.50/site-lisp/org-mode/ob-ref hides /usr/share/emacs/24.1.50/lisp/org/ob-ref
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-id hides /usr/share/emacs/24.1.50/lisp/org/org-id
/usr/share/emacs/24.1.50/site-lisp/org-mode/ob-sass hides /usr/share/emacs/24.1.50/lisp/org/ob-sass
/usr/share/emacs/24.1.50/site-lisp/org-mode/ob-picolisp hides /usr/share/emacs/24.1.50/lisp/org/ob-picolisp
/usr/share/emacs/24.1.50/site-lisp/org-mode/ob-sqlite hides /usr/share/emacs/24.1.50/lisp/org/ob-sqlite
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-xoxo hides /usr/share/emacs/24.1.50/lisp/org/org-xoxo
/usr/share/emacs/24.1.50/site-lisp/org-mode/ob-calc hides /usr/share/emacs/24.1.50/lisp/org/ob-calc
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-mhe hides /usr/share/emacs/24.1.50/lisp/org/org-mhe
/usr/share/emacs/24.1.50/site-lisp/org-mode/org hides /usr/share/emacs/24.1.50/lisp/org/org
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-docbook hides /usr/share/emacs/24.1.50/lisp/org/org-docbook
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-mouse hides /usr/share/emacs/24.1.50/lisp/org/org-mouse
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-html hides /usr/share/emacs/24.1.50/lisp/org/org-html
/usr/share/emacs/24.1.50/site-lisp/org-mode/ob-ditaa hides /usr/share/emacs/24.1.50/lisp/org/ob-ditaa
/usr/share/emacs/24.1.50/site-lisp/org-mode/ob-ocaml hides /usr/share/emacs/24.1.50/lisp/org/ob-ocaml
/usr/share/emacs/24.1.50/site-lisp/org-mode/ob-lisp hides /usr/share/emacs/24.1.50/lisp/org/ob-lisp
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-jsinfo hides /usr/share/emacs/24.1.50/lisp/org/org-jsinfo
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-odt hides /usr/share/emacs/24.1.50/lisp/org/org-odt
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-macs hides /usr/share/emacs/24.1.50/lisp/org/org-macs
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-freemind hides /usr/share/emacs/24.1.50/lisp/org/org-freemind
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-archive hides /usr/share/emacs/24.1.50/lisp/org/org-archive
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-latex hides /usr/share/emacs/24.1.50/lisp/org/org-latex
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-crypt hides /usr/share/emacs/24.1.50/lisp/org/org-crypt
/usr/share/emacs/24.1.50/site-lisp/org-mode/ob-emacs-lisp hides /usr/share/emacs/24.1.50/lisp/org/ob-emacs-lisp
/usr/share/emacs/24.1.50/site-lisp/org-mode/ob-clojure hides /usr/share/emacs/24.1.50/lisp/org/ob-clojure
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-lparse hides /usr/share/emacs/24.1.50/lisp/org/org-lparse
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-colview hides /usr/share/emacs/24.1.50/lisp/org/org-colview
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-taskjuggler hides /usr/share/emacs/24.1.50/lisp/org/org-taskjuggler
/usr/share/emacs/24.1.50/site-lisp/org-mode/ob-matlab hides /usr/share/emacs/24.1.50/lisp/org/ob-matlab
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-faces hides /usr/share/emacs/24.1.50/lisp/org/org-faces
/usr/share/emacs/24.1.50/site-lisp/org-mode/ob-table hides /usr/share/emacs/24.1.50/lisp/org/ob-table
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-capture hides /usr/share/emacs/24.1.50/lisp/org/org-capture
/usr/share/emacs/24.1.50/site-lisp/org-mode/ob-js hides /usr/share/emacs/24.1.50/lisp/org/ob-js
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-mobile hides /usr/share/emacs/24.1.50/lisp/org/org-mobile
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-agenda hides /usr/share/emacs/24.1.50/lisp/org/org-agenda
/usr/share/emacs/24.1.50/site-lisp/org-mode/ob-sql hides /usr/share/emacs/24.1.50/lisp/org/ob-sql
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-special-blocks hides /usr/share/emacs/24.1.50/lisp/org/org-special-blocks
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-beamer hides /usr/share/emacs/24.1.50/lisp/org/org-beamer
/usr/share/emacs/24.1.50/site-lisp/org-mode/ob-fortran hides /usr/share/emacs/24.1.50/lisp/org/ob-fortran
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-timer hides /usr/share/emacs/24.1.50/lisp/org/org-timer
/usr/share/emacs/24.1.50/site-lisp/org-mode/ob-perl hides /usr/share/emacs/24.1.50/lisp/org/ob-perl
/usr/share/emacs/24.1.50/site-lisp/org-mode/ob-R hides /usr/share/emacs/24.1.50/lisp/org/ob-R
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-ctags hides /usr/share/emacs/24.1.50/lisp/org/org-ctags
/usr/share/emacs/24.1.50/site-lisp/org-mode/ob-ruby hides /usr/share/emacs/24.1.50/lisp/org/ob-ruby
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-compat hides /usr/share/emacs/24.1.50/lisp/org/org-compat
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-feed hides /usr/share/emacs/24.1.50/lisp/org/org-feed
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-publish hides /usr/share/emacs/24.1.50/lisp/org/org-publish
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-remember hides /usr/share/emacs/24.1.50/lisp/org/org-remember
/usr/share/emacs/24.1.50/site-lisp/org-mode/ob-C hides /usr/share/emacs/24.1.50/lisp/org/ob-C
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-vm hides /usr/share/emacs/24.1.50/lisp/org/org-vm
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-datetree hides /usr/share/emacs/24.1.50/lisp/org/org-datetree
/usr/share/emacs/24.1.50/site-lisp/org-mode/ob-awk hides /usr/share/emacs/24.1.50/lisp/org/ob-awk
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-plot hides /usr/share/emacs/24.1.50/lisp/org/org-plot
/usr/share/emacs/24.1.50/site-lisp/org-mode/ob-scheme hides /usr/share/emacs/24.1.50/lisp/org/ob-scheme
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-attach hides /usr/share/emacs/24.1.50/lisp/org/org-attach
/usr/share/emacs/24.1.50/site-lisp/org-mode/ob-lob hides /usr/share/emacs/24.1.50/lisp/org/ob-lob
/usr/share/emacs/24.1.50/site-lisp/org-mode/ob-comint hides /usr/share/emacs/24.1.50/lisp/org/ob-comint
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-inlinetask hides /usr/share/emacs/24.1.50/lisp/org/org-inlinetask
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-clock hides /usr/share/emacs/24.1.50/lisp/org/org-clock
/usr/share/emacs/24.1.50/site-lisp/org-mode/org-info hides /usr/share/emacs/24.1.50/lisp/org/org-info

Features:
(shadow sort gnus-util mail-extr 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 benchmark time-date tooltip ediff-hook
vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list newcomment lisp-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse 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 dbusbind dynamic-setting
system-font-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty emacs)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11943; Package emacs. (Sun, 15 Jul 2012 03:11:02 GMT) Full text and rfc822 format available.

Message #8 received at 11943 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Dima Kogan <dima <at> secretsauce.net>
Cc: 11943 <at> debbugs.gnu.org
Subject: Re: bug#11943: 24.1.50;
	Emacs unusably slow when looking at large files (bidi support
	at	fault)
Date: Sun, 15 Jul 2012 06:04:47 +0300
> From: Dima Kogan <dima <at> secretsauce.net>
> Date: Sat, 14 Jul 2012 17:50:51 -0700
> 
> I'm observing that when some large text files are loaded, emacs slows to
> a crawl. As an example, I have a 14MB file open (with emacs -Q). Every
> time I do (next-line) or (previous-line) it takes a few seconds. This is
> a > 2GHz Core2 machine, so there's no reason for this to happen. 'M-x
> benchmark' says that (previous-line) takes >2s each time. I discovered
> that if I do (setq bidi-display-reordering nil) then emacs is snappy
> again, with previous-line taking <1ms.
> 
> The specific file I'm using to exhibit the bug consists of many repeated
> stanzas such as
> 
> =========================
> {
>  {2.222222,2.222222,2.222222,2.2},
>  {-2.222222,2.222222,2.222222},
>  {-22.222222,22.222222,2.222222}
> },
> =========================
> 
> without the =. Saving a stanza into a file called 'snippet', the 14MB
> file can be made with
> 
> $ for i in `seq 17`; do cat snippet snippet > xxx; mv xxx snippet; done

What is the major mode in the buffer where you see this?  I mean the
real-life example where you bumped into this, not the 'snippet' file
produced by the above.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11943; Package emacs. (Sun, 15 Jul 2012 03:37:02 GMT) Full text and rfc822 format available.

Message #11 received at 11943 <at> debbugs.gnu.org (full text, mbox):

From: Dima Kogan <dima <at> secretsauce.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 11943 <at> debbugs.gnu.org
Subject: Re: bug#11943: 24.1.50;	Emacs unusably slow when looking at large
	files (bidi support at	fault)
Date: Sat, 14 Jul 2012 20:31:03 -0700
> On Sun, 15 Jul 2012 06:04:47 +0300
> Eli Zaretskii <eliz <at> gnu.org> wrote:
>
> > From: Dima Kogan <dima <at> secretsauce.net>
> > Date: Sat, 14 Jul 2012 17:50:51 -0700
> > 
> > I'm observing that when some large text files are loaded, emacs
> > slows to a crawl. As an example, I have a 14MB file open (with
> > emacs -Q). Every time I do (next-line) or (previous-line) it takes
> > a few seconds. This is a > 2GHz Core2 machine, so there's no reason
> > for this to happen. 'M-x benchmark' says that (previous-line) takes
> > >2s each time. I discovered that if I do (setq
> > >bidi-display-reordering nil) then emacs is snappy
> > again, with previous-line taking <1ms.
> > 
> > The specific file I'm using to exhibit the bug consists of many
> > repeated stanzas such as
> > 
> > =========================
> > {
> >  {2.222222,2.222222,2.222222,2.2},
> >  {-2.222222,2.222222,2.222222},
> >  {-22.222222,22.222222,2.222222}
> > },
> > =========================
> > 
> > without the =. Saving a stanza into a file called 'snippet', the
> > 14MB file can be made with
> > 
> > $ for i in `seq 17`; do cat snippet snippet > xxx; mv xxx snippet;
> > done
> 
> What is the major mode in the buffer where you see this?  I mean the
> real-life example where you bumped into this, not the 'snippet' file
> produced by the above.

fundamental-mode




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11943; Package emacs. (Sun, 15 Jul 2012 12:05:01 GMT) Full text and rfc822 format available.

Message #14 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Lawrence Mitchell <wence <at> gmx.li>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#11943: 24.1.50;
	Emacs unusably slow when looking at large files (bidi support
	at	fault)
Date: Sun, 15 Jul 2012 12:58:17 +0100
Eli Zaretskii wrote:

[...]

> What is the major mode in the buffer where you see this?  I mean the
> real-life example where you bumped into this, not the 'snippet' file
> produced by the above.

This appears to be an issue with buffers that have no strongly
R2L or L2R characters near point-min.

emacs -Q

C-x b *tmp* RET
M-x fundamental-mode RET
M-: (dotimes (i 100000) (insert "1\n")) RET
M-<

next-line now has a noticeable delay (especially when holding
down next-line, display doesn't update the cursor position).

Now insert an 'a' somewhere near the beginning of the buffer,
display updates appear instantaneous again.  If we instead go to
the end of the buffer and insert an 'a', no such change in the
response occurs.

Cheers,
Lawrence
-- 
Lawrence Mitchell <wence <at> gmx.li>





Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sun, 15 Jul 2012 14:54:01 GMT) Full text and rfc822 format available.

Notification sent to Dima Kogan <dima <at> secretsauce.net>:
bug acknowledged by developer. (Sun, 15 Jul 2012 14:54:01 GMT) Full text and rfc822 format available.

Message #19 received at 11943-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Dima Kogan <dima <at> secretsauce.net>
Cc: 11943-done <at> debbugs.gnu.org
Subject: Re: bug#11943: 24.1.50;
	Emacs unusably slow when looking at large files (bidi support
	at	fault)
Date: Sun, 15 Jul 2012 17:47:18 +0300
> Date: Sat, 14 Jul 2012 20:31:03 -0700
> From: Dima Kogan <dima <at> secretsauce.net>
> Cc: 11943 <at> debbugs.gnu.org
> 
> > On Sun, 15 Jul 2012 06:04:47 +0300
> > Eli Zaretskii <eliz <at> gnu.org> wrote:
> >
> > > From: Dima Kogan <dima <at> secretsauce.net>
> > > Date: Sat, 14 Jul 2012 17:50:51 -0700
> > > 
> > > I'm observing that when some large text files are loaded, emacs
> > > slows to a crawl. As an example, I have a 14MB file open (with
> > > emacs -Q). Every time I do (next-line) or (previous-line) it takes
> > > a few seconds. This is a > 2GHz Core2 machine, so there's no reason
> > > for this to happen. 'M-x benchmark' says that (previous-line) takes
> > > >2s each time. I discovered that if I do (setq
> > > >bidi-display-reordering nil) then emacs is snappy
> > > again, with previous-line taking <1ms.
> > > 
> > > The specific file I'm using to exhibit the bug consists of many
> > > repeated stanzas such as
> > > 
> > > =========================
> > > {
> > >  {2.222222,2.222222,2.222222,2.2},
> > >  {-2.222222,2.222222,2.222222},
> > >  {-22.222222,22.222222,2.222222}
> > > },
> > > =========================
> > > 
> > > without the =. Saving a stanza into a file called 'snippet', the
> > > 14MB file can be made with
> > > 
> > > $ for i in `seq 17`; do cat snippet snippet > xxx; mv xxx snippet;
> > > done
> > 
> > What is the major mode in the buffer where you see this?  I mean the
> > real-life example where you bumped into this, not the 'snippet' file
> > produced by the above.
> 
> fundamental-mode

The recommended way to handle such buffers is to set
bidi-paragraph-direction to left-to-right.  Major modes for editing
program source, that inherit from prog-mode, already do that
automatically, but fundamental-mode does not (and can not, IMO).
That's why I asked you about the major mode.

Anyway, to avoid such catastrophic slow-downs, I made a change in the
code that determines base paragraph direction, and committed those
changes as trunk revision 109098.  With those changes, redisplay
should be again fast, even with bidi-paragraph-direction at its
default nil value.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11943; Package emacs. (Sun, 15 Jul 2012 14:58:02 GMT) Full text and rfc822 format available.

Message #22 received at 11943 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lawrence Mitchell <wence <at> gmx.li>
Cc: 11943 <at> debbugs.gnu.org
Subject: Re: bug#11943: 24.1.50;
	Emacs unusably slow when looking at large files (bidi
	support	at	fault)
Date: Sun, 15 Jul 2012 17:51:15 +0300
> From: Lawrence Mitchell <wence <at> gmx.li>
> Date: Sun, 15 Jul 2012 12:58:17 +0100
> 
> This appears to be an issue with buffers that have no strongly
> R2L or L2R characters near point-min.

More accurately, it was an issue with _paragraphs_ that have no strong
directional characters.

> C-x b *tmp* RET
> M-x fundamental-mode RET
> M-: (dotimes (i 100000) (insert "1\n")) RET
> M-<
> 
> next-line now has a noticeable delay (especially when holding
> down next-line, display doesn't update the cursor position).
> 
> Now insert an 'a' somewhere near the beginning of the buffer,
> display updates appear instantaneous again.  If we instead go to
> the end of the buffer and insert an 'a', no such change in the
> response occurs.

However, if you insert "a\n\n" at the beginning, the slowdown comes
back again.  Which is to say that the problem is not with what we have
at point-min, but what we have in the paragraph around point.  The
fact that setting bidi-paragraph-direction to a non-nil value makes
the problem go away is another telltale sign of that.

Anyway, it's solved now.

Thanks.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 13 Aug 2012 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 279 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.