From: Gennady Uraltsev <gennady.uraltsev@gmail.com>
To: 26402@debbugs.gnu.org
Subject: bug#26402: 25.2; Font rendering extremely slow on any non-default font
Date: Sat, 8 Apr 2017 15:48:38 +0200 [thread overview]
Message-ID: <588df69e-068d-e2c5-3c2f-3ca238313aa9@gmail.com> (raw)
[-- Attachment #1.1.1: Type: text/plain, Size: 16364 bytes --]
Font rendering in emacs is incredibly slow if any buffer-local change is
made i.e. unless using 'default.
I tried moving the cursor in a small (30 line) text file in emacs under
X. It works perfectly, also changing the default font size with
set-face-font or set-frame-font
works perfectly well. On the other hand, any buffer local change of font
makes everything extremely slow. These modifications include
(buffer-face-set 'fixed-pitch)
or
text-scale-adjust
The cursor gets redrawn around once every second making using emacs
impossible.
I am attaching the profiler logs for moving the cursor from the
beginning to the end of the 30 line buffer
Default run:
> - command-execute 122 96%
> - call-interactively 122 96%
> - byte-code 88 69%
> - read-extended-command 88 69%
> - completing-read 88 69%
> - completing-read-default 88 69%
> - read-from-minibuffer 25 19%
> - redisplay_internal (C function) 3 2%
> - funcall 3 2%
> - #<compiled 0x26fa55> 3 2%
> - gui-backend-selection-exists-p 3 2%
> - apply 3 2%
> #<compiled 0x49fcad> 3 2%
> - command-execute 2 1%
> - call-interactively 2 1%
> - funcall-interactively 2 1%
> - previous-line-or-history-element 2 1%
> - previous-history-element 2 1%
> goto-history-element 2 1%
> - funcall-interactively 34 26%
> - execute-extended-command 33 26%
> - sit-for 25 19%
> - redisplay 20 15%
> - redisplay_internal (C function) 4 3%
> - funcall 4 3%
> - #<compiled 0x26fa55> 4 3%
> - gui-backend-selection-exists-p 4 3%
> - apply 4 3%
> #<compiled 0x49fcad> 4 3%
> - command-execute 8 6%
> - call-interactively 8 6%
> - funcall-interactively 8 6%
> - profiler-report 8 6%
> - profiler-report-cpu 8 6%
> profiler-cpu-profile 8 6%
> - next-line 1 0%
> - line-move 1 0%
> - line-move-partial 1 0%
> - window-screen-lines 1 0%
> - window-inside-pixel-edges 1 0%
> window-edges 1 0%
> - ... 4 3%
> Automatic GC 4 3%
Run after set-frame-font:
> - command-execute 100 90%
> - call-interactively 100 90%
> - byte-code 58 52%
> - read-extended-command 58 52%
> - completing-read 58 52%
> + completing-read-default 58 52%
> - funcall-interactively 42 37%
> - execute-extended-command 36 32%
> - sit-for 24 21%
> - redisplay 17 15%
> - redisplay_internal (C function) 2 1%
> - funcall 2 1%
> - #<compiled 0x26fa55> 2 1%
> - gui-backend-selection-exists-p 2 1%
> - apply 2 1%
> #<compiled 0x49fcad> 2 1%
> - command-execute 12 10%
> - call-interactively 12 10%
> - funcall-interactively 12 10%
> - profiler-report 12 10%
> - profiler-report-cpu 12 10%
> profiler-cpu-profile 12 10%
> - next-line 6 5%
> - line-move 6 5%
> line-move-visual 6 5%
> - ... 10 9%
> Automatic GC 10 9%
> - timer-event-handler 1 0%
> - apply 1 0%
> jit-lock-context-fontify 1 0%
BAD run after text-scale-adjust
> - command-execute 2024 99%
> - call-interactively 2024 99%
> - funcall-interactively 1999 98%
> - next-line 1965 96%
> - line-move 1965 96%
> - line-move-partial 1433 70%
> - default-line-height 730 35%
> default-font-height 730 35%
> - window-screen-lines 695 34%
> - default-line-height 691 33%
> default-font-height 691 33%
> - window-inside-pixel-edges 4 0%
> window-edges 4 0%
> - window-inside-pixel-edges 8 0%
> - window-edges 8 0%
> - window-current-scroll-bars 4 0%
> frame-current-scroll-bars 4 0%
> - default-line-height 524 25%
> default-font-height 524 25%
> line-move-visual 4 0%
> - window-inside-pixel-edges 4 0%
> - window-edges 4 0%
> - window-current-scroll-bars 4 0%
> frame-current-scroll-bars 4 0%
> - execute-extended-command 34 1%
> - sit-for 22 1%
> redisplay 16 0%
> - command-execute 12 0%
> - call-interactively 12 0%
> - funcall-interactively 12 0%
> - profiler-report 12 0%
> - profiler-report-cpu 12 0%
> profiler-cpu-profile 12 0%
> - byte-code 25 1%
> - read-extended-command 25 1%
> - completing-read 25 1%
> - completing-read-default 25 1%
> read-from-minibuffer 19 0%
> - ... 11 0%
> Automatic GC 11 0%
BAD run after (buffer-set-face fixed-pitch)
> command-execute 1778 99%
> - call-interactively 1778 99%
> - funcall-interactively 1745 97%
> - next-line 1716 96%
> - line-move 1716 96%
> - line-move-partial 1176 65%
> - default-line-height 608 34%
> default-font-height 608 34%
> - window-screen-lines 568 31%
> - default-line-height 568 31%
> default-font-height 568 31%
> - default-line-height 540 30%
> default-font-height 540 30%
> - execute-extended-command 29 1%
> - sit-for 15 0%
> redisplay 12 0%
> - command-execute 14 0%
> - call-interactively 14 0%
> - funcall-interactively 14 0%
> - profiler-report 10 0%
> - profiler-report-cpu 10 0%
> profiler-cpu-profile 10 0%
> profiler-start 4 0%
> - byte-code 33 1%
> - read-extended-command 33 1%
> - completing-read 33 1%
> - completing-read-default 33 1%
> read-from-minibuffer 17 0%
> - ... 8 0%
> Automatic GC 8 0%
In GNU Emacs 25.2.1 (x86_64-suse-linux-gnu, GTK+ Version 3.20.10)
of 2017-03-27 built on lamb61
Windowing system distributor 'The X.Org Foundation', version 11.0.11803000
System Description: openSUSE Leap 42.2
Configured using:
'configure --with-pop --without-hesiod --with-kerberos --with-kerberos5
--with-xim --with-wide-int --with-file-notification=inotify
--with-modules --enable-autodepend --prefix=/usr
--mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share
--localstatedir=/var --sharedstatedir=/var/lib --libexecdir=/usr/lib
--enable-locallisppath=/usr/share/emacs/25.2/site-lisp:/usr/share/emacs/site-lisp
--with-x --with-sound --with-xpm --with-jpeg --with-tiff --with-gif
--with-png --with-rsvg --with-dbus --with-xft --without-gpm
--with-x-toolkit=gtk3 --with-xwidgets --x-includes=/usr/include
--x-libraries=/usr/lib64 --with-libotf --with-m17n-flt
--build=x86_64-suse-linux 'CFLAGS=-fmessage-length=0
-grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector
-funwind-tables -fasynchronous-unwind-tables -g -D_GNU_SOURCE
-DGDK_DISABLE_DEPRECATION_WARNINGS -DGLIB_DISABLE_DEPRECATION_WARNINGS
-pipe -Wno-pointer-sign -Wno-unused-variable -Wno-unused-label
-Wno-unprototyped-calls -fno-optimize-sibling-calls -fno-PIE
-DSYSTEM_PURESIZE_EXTRA=55000 -DSITELOAD_PURESIZE_EXTRA=10000 '
LDFLAGS=-Wl,-O2'
Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND DBUS GCONF GSETTINGS NOTIFY
ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 MODULES XWIDGETS
Important settings:
value of $LC_CTYPE: en_US.UTF-8
value of $LC_MONETARY: de_DE.UTF-8
value of $LC_NUMERIC: POSIX
value of $LC_TIME: en_GB.UTF-8
value of $LANG: en_US.UTF-8
value of $XMODIFIERS: @im=local
locale-coding-system: utf-8-unix
Major mode: Fundamental
Minor modes in effect:
buffer-face-mode: t
tooltip-mode: t
global-eldoc-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
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 messages:
Making completion list... [2 times]
delete-backward-char: Text is read-only
Making completion list... [3 times]
You can run the command ‘buffer-face-set’ with M-x bu-s RET
previous-line: Beginning of buffer [3 times]
CPU profiler stopped
CPU profiler started
next-line: End of buffer
Wrote /home/guraltsev/admin/bugs/emacs/font-slow/buffer-set-face-fixed-pitch
C-x <up> is undefined [2 times]
Load-path shadows:
None found.
Features:
(shadow sort mail-extr emacsbug message dired format-spec rfc822 mml
mml-sec password-cache epg epg-config gnus-util mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util help-fns help-mode mail-prsvr
mail-utils thingatpt profiler easymenu cl-loaddefs pcase cl-lib
face-remap time-date mule-util delsel lpr tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list newcomment elisp-mode lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core frame cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help
simple abbrev minibuffer cl-preloaded 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
dbusbind inotify dynamic-setting system-font-setting font-render-setting
xwidget-internal move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)
Memory information:
((conses 16 121417 15744)
(symbols 48 22660 0)
(miscs 40 5039 157)
(strings 32 23137 10436)
(string-bytes 1 677307)
(vectors 16 67484)
(vector-slots 8 1659575 10120)
(floats 8 184 184)
(intervals 56 446 10)
(buffers 976 24)
(heap 1024 58366 8411))
[-- Attachment #1.1.2: BAD-text-scale-adjust-profile --]
[-- Type: text/plain, Size: 2419 bytes --]
[profiler-profile "24.3" cpu #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8 data ([redisplay sit-for execute-extended-command funcall-interactively call-interactively command-execute nil nil nil nil nil nil nil nil nil nil] 16 [sit-for execute-extended-command funcall-interactively call-interactively command-execute nil nil nil nil nil nil nil nil nil nil nil] 6 [default-font-height default-line-height line-move-partial line-move next-line funcall-interactively call-interactively command-execute nil nil nil nil nil nil nil nil] 730 [default-font-height default-line-height window-screen-lines line-move-partial line-move next-line funcall-interactively call-interactively command-execute nil nil nil nil nil nil nil] 691 [default-font-height default-line-height line-move next-line funcall-interactively call-interactively command-execute nil nil nil nil nil nil nil nil nil] 524 [window-edges window-inside-pixel-edges window-screen-lines line-move-partial line-move next-line funcall-interactively call-interactively command-execute nil nil nil nil nil nil nil] 4 [line-move-visual line-move next-line funcall-interactively call-interactively command-execute nil nil nil nil nil nil nil nil nil nil] 4 [frame-current-scroll-bars window-current-scroll-bars window-edges window-inside-pixel-edges line-move next-line funcall-interactively call-interactively command-execute nil nil nil nil nil nil nil] 4 [frame-current-scroll-bars window-current-scroll-bars window-edges window-inside-pixel-edges line-move-partial line-move next-line funcall-interactively call-interactively command-execute nil nil nil nil nil nil] 4 [window-edges window-inside-pixel-edges line-move-partial line-move next-line funcall-interactively call-interactively command-execute nil nil nil nil nil nil nil nil] 4 [read-from-minibuffer completing-read-default completing-read read-extended-command byte-code call-interactively command-execute nil nil nil nil nil nil nil nil nil] 19 [completing-read-default completing-read read-extended-command byte-code call-interactively command-execute nil nil nil nil nil nil nil nil nil nil] 6 [profiler-cpu-profile profiler-report-cpu profiler-report funcall-interactively call-interactively command-execute execute-extended-command funcall-interactively call-interactively command-execute nil nil nil nil nil nil] 12 [Automatic\ GC] 11)) (22760 58176 318849 204000) nil]
[-- Attachment #1.1.3: BAD-buffer-set-face-fixed-pitch-profile --]
[-- Type: text/plain, Size: 1766 bytes --]
[profiler-profile "24.3" cpu #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8 data ([profiler-start funcall-interactively call-interactively command-execute execute-extended-command funcall-interactively call-interactively command-execute nil nil nil nil nil nil nil nil] 4 [redisplay sit-for execute-extended-command funcall-interactively call-interactively command-execute nil nil nil nil nil nil nil nil nil nil] 12 [sit-for execute-extended-command funcall-interactively call-interactively command-execute nil nil nil nil nil nil nil nil nil nil nil] 3 [default-font-height default-line-height line-move-partial line-move next-line funcall-interactively call-interactively command-execute nil nil nil nil nil nil nil nil] 608 [default-font-height default-line-height window-screen-lines line-move-partial line-move next-line funcall-interactively call-interactively command-execute nil nil nil nil nil nil nil] 568 [default-font-height default-line-height line-move next-line funcall-interactively call-interactively command-execute nil nil nil nil nil nil nil nil nil] 540 [nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil] 4 [read-from-minibuffer completing-read-default completing-read read-extended-command byte-code call-interactively command-execute nil nil nil nil nil nil nil nil nil] 17 [completing-read-default completing-read read-extended-command byte-code call-interactively command-execute nil nil nil nil nil nil nil nil nil nil] 16 [profiler-cpu-profile profiler-report-cpu profiler-report funcall-interactively call-interactively command-execute execute-extended-command funcall-interactively call-interactively command-execute nil nil nil nil nil nil] 10 [Automatic\ GC] 8)) (22760 58394 492030 54000) nil]
[-- Attachment #1.1.4: GOOD-default-profile --]
[-- Type: text/plain, Size: 2040 bytes --]
[profiler-profile "24.3" cpu #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8 data ([redisplay sit-for execute-extended-command funcall-interactively call-interactively command-execute nil nil nil nil nil nil nil nil nil nil] 16 ["#<compiled 0x49fcad>" apply gui-backend-selection-exists-p "#<compiled 0x26fa55>" funcall redisplay_internal\ \(C\ function\) redisplay sit-for execute-extended-command funcall-interactively call-interactively command-execute nil nil nil nil] 4 [sit-for execute-extended-command funcall-interactively call-interactively command-execute nil nil nil nil nil nil nil nil nil nil nil] 5 [nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil] 26 [window-edges window-inside-pixel-edges window-screen-lines line-move-partial line-move next-line funcall-interactively call-interactively command-execute nil nil nil nil nil nil nil] 1 [completing-read-default completing-read read-extended-command byte-code call-interactively command-execute nil nil nil nil nil nil nil nil nil nil] 63 [read-from-minibuffer completing-read-default completing-read read-extended-command byte-code call-interactively command-execute nil nil nil nil nil nil nil nil nil] 20 ["#<compiled 0x49fcad>" apply gui-backend-selection-exists-p "#<compiled 0x26fa55>" funcall redisplay_internal\ \(C\ function\) read-from-minibuffer completing-read-default completing-read read-extended-command byte-code call-interactively command-execute nil nil nil] 3 [goto-history-element previous-history-element previous-line-or-history-element funcall-interactively call-interactively command-execute read-from-minibuffer completing-read-default completing-read read-extended-command byte-code call-interactively command-execute nil nil nil] 2 [profiler-cpu-profile profiler-report-cpu profiler-report funcall-interactively call-interactively command-execute execute-extended-command funcall-interactively call-interactively command-execute nil nil nil nil nil nil] 8 [Automatic\ GC] 4)) (22760 58093 299567 465000) nil]
[-- Attachment #1.1.5: GOOD-set-frame-font-profile --]
[-- Type: text/plain, Size: 2292 bytes --]
[profiler-profile "24.3" cpu #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8 data (["#<compiled 0x49fcad>" apply gui-backend-selection-exists-p "#<compiled 0x26fa55>" funcall redisplay_internal\ \(C\ function\) redisplay sit-for execute-extended-command funcall-interactively call-interactively command-execute nil nil nil nil] 2 [redisplay sit-for execute-extended-command funcall-interactively call-interactively command-execute nil nil nil nil nil nil nil nil nil nil] 15 [sit-for execute-extended-command funcall-interactively call-interactively command-execute nil nil nil nil nil nil nil nil nil nil nil] 7 [nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil] 24 [jit-lock-context-fontify apply timer-event-handler nil nil nil nil nil nil nil nil nil nil nil nil nil] 1 [line-move-visual line-move next-line funcall-interactively call-interactively command-execute nil nil nil nil nil nil nil nil nil nil] 6 [completing-read-default completing-read read-extended-command byte-code call-interactively command-execute nil nil nil nil nil nil nil nil nil nil] 39 [image-search-load-path find-image eval "#<compiled 0x280363>" mapcar tool-bar-make-keymap-1 tool-bar-make-keymap redisplay_internal\ \(C\ function\) read-from-minibuffer completing-read-default completing-read read-extended-command byte-code call-interactively command-execute nil] 4 [read-from-minibuffer completing-read-default completing-read read-extended-command byte-code call-interactively command-execute nil nil nil nil nil nil nil nil nil] 11 [apply timer-event-handler read-from-minibuffer completing-read-default completing-read read-extended-command byte-code call-interactively command-execute nil nil nil nil nil nil nil] 3 [line-move-visual line-move previous-line previous-line-or-history-element funcall-interactively call-interactively command-execute read-from-minibuffer completing-read-default completing-read read-extended-command byte-code call-interactively command-execute nil nil] 1 [profiler-cpu-profile profiler-report-cpu profiler-report funcall-interactively call-interactively command-execute execute-extended-command funcall-interactively call-interactively command-execute nil nil nil nil nil nil] 12 [Automatic\ GC] 10)) (22760 58827 129064 974000) nil]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next reply other threads:[~2017-04-08 13:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-08 13:48 Gennady Uraltsev [this message]
2017-04-08 14:44 ` bug#26402: 25.2; Font rendering extremely slow on any non-default font Eli Zaretskii
2017-04-08 14:54 ` Gennady Uraltsev
2017-04-08 16:10 ` Eli Zaretskii
[not found] ` <541302bf-540b-aedb-4ca4-2ba3acfe495e@gmail.com>
2017-04-08 17:18 ` Eli Zaretskii
2017-04-08 22:33 ` Gennady Uraltsev
2017-04-09 5:44 ` Eli Zaretskii
2017-04-09 9:45 ` Eli Zaretskii
2017-04-09 11:07 ` Gennady Uraltsev
2017-04-09 11:59 ` Eli Zaretskii
2019-11-17 7:47 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=588df69e-068d-e2c5-3c2f-3ca238313aa9@gmail.com \
--to=gennady.uraltsev@gmail.com \
--cc=26402@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).