* bug#15011: 24.3; Scrolling Performance
@ 2013-08-02 17:33 Calkins, Chad M
2013-08-02 22:26 ` Barry OReilly
0 siblings, 1 reply; 7+ messages in thread
From: Calkins, Chad M @ 2013-08-02 17:33 UTC (permalink / raw)
To: 15011
[-- Attachment #1: Type: text/plain, Size: 8557 bytes --]
This bug report will be sent to the Bug-GNU-Emacs mailing list
and the GNU bug tracker at debbugs.gnu.org. Please check that
the From: line contains a valid email address. After a delay of up
to one day, you should receive an acknowledgment at that address.
Please write in English if possible, as the Emacs maintainers
usually do not have translators for other languages.
Please describe exactly what actions triggered the bug, and
the precise symptoms of the bug. If you can, give a recipe
starting from `emacs -Q':
Open large C++ file (17,000 line in this case). Hold down Page Down
key. Emacs will scroll two or three times and then pause for 15 seconds
or more. Once you have scrolled to the bottom of the file Page Down
will work reasonably, however page up remains slow. emacs -Q is
marginally faster than my configuration (just marginally). When doing
any scrolling the CPU is maxed. (core 2 duo)
Emacs GNU Emacs 22.3.1 (i386-mingw-nt6.1.7601) also has slower initial
scroll through, it does not however lock up and after the initial scroll
through both page up and page down display every single step. (Initial
scroll through is only marginally slower than subsequent ones).
If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
`bt full' and `xbacktrace'.
For information about debugging Emacs, please read the file
c:/working_chad/emacs_new_current/emacs-24.3/etc/DEBUG.
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: Org
Minor modes in effect:
which-function-mode: t
global-auto-revert-mode: t
show-paren-mode: t
cua-mode: t
mouse-wheel-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
column-number-mode: t
line-number-mode: t
transient-mark-mode: t
Recent input:
<help-echo> <help-echo> <help-echo> <down-mouse-1>
<mouse-movement> <mouse-1> <C-prior> <C-home> C-z <up>
<up> <C-home> C-s c r e a t e <up> <up> <up> <up> <up>
<up> <down-mouse-1> <mouse-1> <wheel-down> <double-wheel-down>
<triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
<triple-wheel-down> <triple-wheel-down> <help-echo>
<help-echo> <help-echo> <wheel-up> <double-wheel-up>
<down-mouse-1> <mouse-1> <menu-bar> <Org> <Logging
work> <Clock in> <help-echo> <menu-bar> <Org> <Logging
work> <Clock out> <menu-bar> <Org> <Logging work> <Clock
in> <help-echo> <down-mouse-1> <mouse-1> <wheel-up>
<double-wheel-up> <triple-wheel-up> <triple-wheel-up>
<triple-wheel-up> <triple-wheel-up> <down-mouse-1>
<mouse-1> <wheel-up> <double-wheel-up> <triple-wheel-up>
<triple-wheel-up> <wheel-down> <double-wheel-down>
<triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
<wheel-up> <double-wheel-up> <triple-wheel-up> <triple-wheel-up>
<triple-wheel-up> <triple-wheel-up> <triple-wheel-up>
<triple-wheel-up> <wheel-down> <double-wheel-down>
<down-mouse-1> <mouse-1> <down-mouse-1> <mouse-movement>
<mouse-1> <down-mouse-1> <mouse-1> C-s c r e a t e
SPC u s <down-mouse-1> <mouse-1> c r e a t SPC <backspace>
e SPC u s e r SPC f o r t i s SPC i d e n t i f i e
d SPC b y SPC f o r t i s ; <return> <help-echo> <down-mouse-1>
<mouse-1> C-s g r a n t C-s C-s C-s <C-home> C-s C-s
<down-mouse-1> <mouse-1> g r a n t SPC d b a SPC t
o SPC f o r t i s ; <return> <help-echo> <down-mouse-1>
<mouse-movement> <wheel-up> <drag-mouse-1> <wheel-down>
<wheel-down> <wheel-down> <wheel-down> <double-wheel-down>
<triple-wheel-down> <triple-wheel-down> <down-mouse-1>
<mouse-1> <wheel-up> <double-wheel-up> <triple-wheel-up>
<triple-wheel-up> <triple-wheel-up> <triple-wheel-up>
<triple-wheel-up> <wheel-up> <double-wheel-up> <triple-wheel-up>
<triple-wheel-up> <triple-wheel-up> <wheel-up> <double-wheel-up>
<triple-wheel-up> <triple-wheel-up> <triple-wheel-up>
<C-kp-3> <C-f12> <wheel-down> <wheel-down> <wheel-down>
<wheel-down> <double-wheel-down> <triple-wheel-down>
<triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
<triple-wheel-down> <triple-wheel-down> <wheel-down>
<wheel-down> <double-wheel-down> <triple-wheel-down>
<triple-wheel-down> <help-echo> <wheel-up> <double-wheel-up>
<triple-wheel-up> <triple-wheel-up> <triple-wheel-up>
<wheel-up> <double-wheel-up> <triple-wheel-up> <triple-wheel-up>
<triple-wheel-up> <wheel-up> <wheel-down> <double-wheel-down>
<C-f12> <left> <left> <left> <left> C-c C-c <help-echo>
<down-mouse-1> <mouse-1> <down-mouse-1> <mouse-1> <home>
<S-down> <delete> <up> C-c C-c <up> <up> <right> <down>
<right> <right> <right> <up> <down> C-c C-c <menu-bar>
<Org> <Logging work> <Clock out> <menu-bar> <Org> <Logging
work> <Clock in> <help-echo> <down-mouse-1> <mouse-movement>
<mouse-1> M-x r e p o r t - e m <tab> <return>
Recent messages:
Clock starts at [2013-08-02 Fri 10:41] - showing entire task time.
byte-code: Beginning of buffer [13 times]
Mark saved where search started [2 times]
Mark set
Mark saved where search started
Auto-saving...done
Mark set
org-ctrl-c-ctrl-c: C-c C-c can do nothing useful at this location
Clock stopped at [2013-08-02 Fri 10:54] after HH:MM = 0:13
Clock starts at [2013-08-02 Fri 10:55] - showing entire task time.
Load-path shadows:
None found.
Features:
(shadow sort mail-extr emacsbug message rfc822 mml mml-sec mm-decode
mm-bodies mm-encode mailabbrev gmm-utils mailheader sendmail mail-utils
sql vc-cvs vc-rcs vc-dir ewoc vc misearch multi-isearch add-log
vc-dispatcher vc-svn hideshow help-mode tabify org-table org-clock
w32-fullscreen org-wl org-w3m org-vm org-rmail org-mhe org-mew org-irc
org-jsinfo org-infojs org-html org-exp ob-exp org-agenda org-info
org-gnus org-docview org-bibtex bibtex org-bbdb org ob-tangle ob-ref
ob-lob ob-table org-footnote org-src ob-comint ob-keys org-pcomplete
pcomplete org-list org-faces org-entities noutline outline easy-mmode
org-version ob-emacs-lisp ob ob-eval org-loaddefs format-spec cal-menu
calendar cal-loaddefs longlines confluence advice help-fns
advice-preload confluence-edit image-file browse-url thingatpt
ediff-merg ediff-diff ediff-wind ediff-help ediff-util ediff-mult
ediff-init ediff url-http tls url-auth mail-parse rfc2231 rfc2047
rfc2045 ietf-drums url-gw xml-rpc xml doc-view jka-compr image-mode
dired goto-last-change warnings server org-exp-blocks org-compat
org-macs find-func iimage php-mode etags cc-langs cl cc-mode cc-fonts
cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs
speedbar sb-image ezimage dframe easymenu ds-grep derived compile comint
ansi-color ring cl-macs gv cl-lib tempo url url-proxy url-privacy
url-expand url-methods url-history url-cookie url-domsuf url-util
url-parse auth-source eieio byte-opt bytecomp byte-compile cconv
gnus-util mm-util mail-prsvr password-cache url-vars mailcap xml-parse
doxymacs which-func imenu autorevert paren cua-base cus-start cus-load
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)
[-- Attachment #2: Type: text/html, Size: 17946 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#15011: 24.3; Scrolling Performance
2013-08-02 17:33 bug#15011: 24.3; Scrolling Performance Calkins, Chad M
@ 2013-08-02 22:26 ` Barry OReilly
2013-08-02 23:21 ` Drew Adams
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Barry OReilly @ 2013-08-02 22:26 UTC (permalink / raw)
To: 15011
Scrolling is known to be slow in C++ files without some performance
tunes. I use these two customizations myself:
'(font-lock-maximum-decoration (quote ((c++-mode . 2))))
'(jit-lock-defer-time 0.01)
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#15011: 24.3; Scrolling Performance
2013-08-02 22:26 ` Barry OReilly
@ 2013-08-02 23:21 ` Drew Adams
2013-08-03 8:09 ` Eli Zaretskii
2013-08-03 1:26 ` Stefan Monnier
2013-08-03 8:14 ` Eli Zaretskii
2 siblings, 1 reply; 7+ messages in thread
From: Drew Adams @ 2013-08-02 23:21 UTC (permalink / raw)
To: Barry OReilly, 15011
> Scrolling is known to be slow in C++ files without some performance
> tunes. I use these two customizations myself:
>
> '(font-lock-maximum-decoration (quote ((c++-mode . 2))))
> '(jit-lock-defer-time 0.01)
Should settings such as these be turned on by default in C++ mode?
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#15011: 24.3; Scrolling Performance
2013-08-02 22:26 ` Barry OReilly
2013-08-02 23:21 ` Drew Adams
@ 2013-08-03 1:26 ` Stefan Monnier
[not found] ` <20130803140649.GA3348@acm.acm>
2013-08-03 8:14 ` Eli Zaretskii
2 siblings, 1 reply; 7+ messages in thread
From: Stefan Monnier @ 2013-08-03 1:26 UTC (permalink / raw)
To: Barry OReilly; +Cc: 15011
> Scrolling is known to be slow in C++ files without some performance
> tunes. I use these two customizations myself:
> '(font-lock-maximum-decoration (quote ((c++-mode . 2))))
> '(jit-lock-defer-time 0.01)
These are workarounds. We should strive to make the default work well,
without things like jit-lock-defer-time.
Stefan
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#15011: 24.3; Scrolling Performance
2013-08-02 23:21 ` Drew Adams
@ 2013-08-03 8:09 ` Eli Zaretskii
0 siblings, 0 replies; 7+ messages in thread
From: Eli Zaretskii @ 2013-08-03 8:09 UTC (permalink / raw)
To: Drew Adams; +Cc: gundaetiapo, 15011
> Date: Fri, 2 Aug 2013 16:21:38 -0700 (PDT)
> From: Drew Adams <drew.adams@oracle.com>
>
> > Scrolling is known to be slow in C++ files without some performance
> > tunes. I use these two customizations myself:
> >
> > '(font-lock-maximum-decoration (quote ((c++-mode . 2))))
> > '(jit-lock-defer-time 0.01)
>
> Should settings such as these be turned on by default in C++ mode?
The 2nd one causes fast scrolling (e.g., lean on the "C-v" key)
refrain from fontification, so you see unfontified text scrolling past
you. Therefore, I'd advise against such default.
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#15011: 24.3; Scrolling Performance
2013-08-02 22:26 ` Barry OReilly
2013-08-02 23:21 ` Drew Adams
2013-08-03 1:26 ` Stefan Monnier
@ 2013-08-03 8:14 ` Eli Zaretskii
2 siblings, 0 replies; 7+ messages in thread
From: Eli Zaretskii @ 2013-08-03 8:14 UTC (permalink / raw)
To: Barry OReilly; +Cc: 15011
> Date: Fri, 2 Aug 2013 18:26:14 -0400
> From: Barry OReilly <gundaetiapo@gmail.com>
>
> Scrolling is known to be slow in C++ files without some performance
> tunes. I use these two customizations myself:
>
> '(font-lock-maximum-decoration (quote ((c++-mode . 2))))
> '(jit-lock-defer-time 0.01)
Please provide some additional data, like the rate of your keyboard
auto-repeat (assuming that's when the problem happens), the usual
height of your C++ windows, the kind of CPU and clock speed you have,
and some quantitative measure of "slow scrolling".
A repeatable test case, starting from "emacs -Q", with a file to use
would also be good.
Without these data, a bug report such as this can never be known to be
resolved, because there's no way of telling whether what's fast enough
in my use cases is fast enough for yours.
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#15011: 24.3; Scrolling Performance
[not found] ` <20130803140649.GA3348@acm.acm>
@ 2013-08-04 21:32 ` Stefan Monnier
0 siblings, 0 replies; 7+ messages in thread
From: Stefan Monnier @ 2013-08-04 21:32 UTC (permalink / raw)
To: Alan Mackenzie; +Cc: Barry OReilly, 15011
> I think the best behaviour on auto-repeat scrolling in slow fontifying
> modes would be for the text to scroll by unfontified until the
> <page-down> key is released, the final window contents then being
> fontified. I've not managed to configure the current jit-lock to
> achieve this behaviour. Is this possible?
Setting jit-lock-defer-time to (/ 1.0 repeat-rate) should get you
fairly close.
> `jit-lock-function' could then be modified to calculate how many buffer
> positions it is going to be expected to fontify, and whether it can
> achieve this before the putative next auto-repeat scroll command
> arrives.
We could refine jit-lock-defer in such a way, indeed. I guess we could
do something like set jit-lock-defer-time to a very low value (like 0s)
and then each time we get a request for N bytes of fontification, we
postpone running the timer by some additional increment (until reaching
some maximum).
Of course, this assumes that the time to fontify is proportional to the
text to fontify, which is not necessarily the case (in many case,
a significant part of slowdown is a need to scan a large amount of text
before point to determine the syntax at a particular position in the
buffer, so just fontifying this particular position will require a lot
of time).
Note also that the OP mentioned:
> Once you have scrolled to the bottom of the file Page Down will work
> reasonably, however page up remains slow.
Which seems to indicate that page-up scrolling is too slow even
when font/jit-lock is not called any more.
Stefan
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-08-04 21:32 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-02 17:33 bug#15011: 24.3; Scrolling Performance Calkins, Chad M
2013-08-02 22:26 ` Barry OReilly
2013-08-02 23:21 ` Drew Adams
2013-08-03 8:09 ` Eli Zaretskii
2013-08-03 1:26 ` Stefan Monnier
[not found] ` <20130803140649.GA3348@acm.acm>
2013-08-04 21:32 ` Stefan Monnier
2013-08-03 8:14 ` Eli Zaretskii
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).