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

From: martin rudalics <[email-masked]>
Date: Thu, 30 Jan 2014 14:47:34 +0100

> 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%

I checked in a fix such that mouse dragging a line doesn't occur
pixelwise by default.  Does this improve the behavior?  I have no idea
how to interpret the profiler report - when you drag a line it will
always be the case that most of the cpu is consumed by that.

martin