Subject: bug#15390: 24.3; scrolling in emacs,w32 uses 100% cpu

From: Zack Stackson <[email-masked]>
Date: Sun, 15 Sep 2013 13:41:04 -0500

OS: Windows 7 x64
Monitor: 2560x1440
CPU: Intel Core i7 870 2.93 GHz
Display Adapter: AMD Radeon HD 7800
Emacs Version: emacs-24.3-bin-i386.zip. . . . . Mar 19 02:43
ftp://gnu.mirror.iweb.com/emacs/windows/
(Similar bad performance with 23.1, 23.2, 23.3, and 23.4.  Although 23.1 is
not as jumpy as 24.3)

.emacs config:
(setq scroll-step 1)

Open a text file in text-mode with 200 lines, avg line length 60
characters, max line length 70 characters, go to end of buffer, hold up
arrow to scroll up.

Result with emacs-24.3: starts at 10% cpu usage, then stays near 90-100%
cpu usage
Result with emacs-22.3: 0% cpu usage

Open a text file in text-mode with 4000 lines, avg line length 60
characters, max line length 70 characters, go to end of buffer, hold alt-v
to scroll page up.

Result with emacs-24.3: scrolling is jumpy, skipping rendering some pages,
stays near 90-100% cpu usage
Result with emacs-22.3: scrolling is smooth, renders all pages, 0-10% cpu
usage

.emacs config:
(custom-set-faces
 '(default ((t (:stipple nil :background "black" :foreground "grey"
:inverse-video nil :box nil :strike-through nil :overline nil :bold nil
:underline nil :slant normal :weight normal :height 75 :width normal
:family "sixten")))))

Open a text file in text-mode with 4000 lines, avg line length 60
characters, max line length 70 characters, go to end of buffer, hold alt-v
to scroll page up.

Result with emacs-24.3 with smaller font (6x10 from X11): scrolls one page,
then stops rendering anything (second to last page stays on the screen),
uses 100% cpu until top of buffer is reached, then starts rendering again.
Result with emacs-22.3 with smaller font (6x10 from X11): scrolling is
smooth, renders all pages, 0-50% cpu usage.

In GNU Emacs 24.3.1 (i386-mingw-nt6.1.7601)
 of 2013-03-17 on MARVIN
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --with-gcc (4.7) --cflags
 -ID:/devel/emacs/libs/libXpm-3.5.8/include
 -ID:/devel/emacs/libs/libXpm-3.5.8/src
 -ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include
 -ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include
 -ID:/devel/emacs/libs/giflib-4.1.4-1/include
 -ID:/devel/emacs/libs/jpeg-6b-4/include
 -ID:/devel/emacs/libs/tiff-3.8.2-1/include
 -ID:/devel/emacs/libs/gnutls-3.0.9/include
 -ID:/devel/emacs/libs/libiconv-1.13.1-1-dev/include
 -ID:/devel/emacs/libs/libxml2-2.7.8/include/libxml2'

Important settings:
  value of $LANG: ENU
  locale-coding-system: cp1252
  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
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
C-x 1 M-x C-y <return>

Recent messages:
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 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 warnings time-date tooltip ediff-hook
vc-hooks lisp-float-type mwheel dos-w32 ls-lisp w32-common-fns
disp-table w32-win w32-vars 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 macroexp files text-properties overlay sha1 md5 base64 format
env code-pages mule custom widget hashtable-print-readable backquote
make-network-process w32 multi-tty emacs)