Subject: bug#16594: 24.3.50; very slow redraw when resizing windows horizontally

From: Darren Hoo <[email-masked]>
Date: Thu, 30 Jan 2014 16:01:42 +0800

emacs -q
(scroll-bar-mode 'nil)
C-x 3

then try to resize the windows using mouse several times and emacs
redisplay is so slow that you can notice the fringes besides the drag
handle is repainted from top to bottom frame by frame.

profiling shows `read-event' takes much of the time, is this the real
cause?

- command-execute                                                 207  98%
 - call-interactively                                             207  98%
  - mouse-drag-vertical-line                                      202  96%
   - mouse-drag-line                                              202  96%
    - eval                                                        202  96%
     - track-mouse                                                202  96%
      - funcall                                                   202  96%
       - #<compiled 0x40a712ed>                                   202  96%
        - read-event                                              184  87%
         - redisplay_internal (C function)                          1   0%
            eval                                                    1   0%
  + profiler-report                                                 5   2%
- ...                                                               2   0%
   Automatic GC                                                     2   0%
+ redisplay_internal (C function)                                   1   0%

In GNU Emacs 24.3.50.81 (x86_64-apple-darwin13.0.0, NS apple-appkit-1265.00)
 of 2014-01-29 on darren-rmbp
Repository revision: 116189 [email-masked]
Configured using:
 `configure --with-ns'

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-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:
ESC [ ? 1 ; 2 c ESC x r e p o r t TAB RET

Recent messages:
("/Applications/Emacs.app/Contents/MacOS/Emacs")
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 help-fns mail-prsvr mail-utils xterm time-date tooltip electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel ns-win tool-bar dnd
fontset image regexp-opt fringe tabulated-list newcomment lisp-mode
prog-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 nadvice 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
cocoa ns multi-tty emacs)