From: "Clément Pit--Claudel" <clement.pitclaudel@live.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 21028@debbugs.gnu.org
Subject: bug#21028: Performance regression in revision af1a69f4d17a482c359d98c00ef86fac835b5fac (Apr 2014).
Date: Mon, 13 Mar 2017 12:36:25 -0400 [thread overview]
Message-ID: <1e7bc066-3f29-3897-5039-de7233efc58a@live.com> (raw)
In-Reply-To: <837f3tch7y.fsf@gnu.org>
On 2017-03-13 11:46, Eli Zaretskii wrote:
> I installed Fira Sans and Noto Sans, and changed your program to insert
> more of these characters and actually display all the characters it
> inserts (see below).
Thanks, that's a much better repro than mine :) Here are my timings:
# Stock 24.5
12:01:26 /build/emacs
$ time 24.5/src/emacs -Q --eval "(progn (set-fontset-font \"fontset-startup\" 'unicode \"Noto Sans\" nil) (set-fontset-font \"fontset-startup\" 'unicode \"Symbola\" nil 'append) (dotimes (_ 5000) (insert (make-string 20 8658) \"\n\")) (goto-char (point-min)) (sit-for 0) (condition-case nil (while t (scroll-up) (sit-for 0)) (error nil)) (run-with-idle-timer 0 nil #'kill-emacs))"
real 1m1.862s
user 0m18.644s
sys 0m15.972s
# Stock 25.1
$ time 25.1/src/emacs -Q --eval "(progn (set-fontset-font \"fontset-startup\" 'unicode \"Noto Sans\" nil) (set-fontset-font \"fontset-startup\" 'unicode \"Symbola\" nil 'append) (dotimes (_ 5000) (insert (make-string 20 8658) \"\n\")) (goto-char (point-min)) (sit-for 0) (condition-case nil (while t (scroll-up) (sit-for 0)) (error nil)) (run-with-idle-timer 0 nil #'kill-emacs))"
real 1m4.705s
user 0m18.296s
sys 0m18.444s
# Master with your patch
$ time master/src/emacs -Q --eval "(progn (set-fontset-font \"fontset-startup\" 'unicode \"Noto Sans\" nil) (set-fontset-font \"fontset-startup\" 'unicode \"Symbola\" nil 'append) (dotimes (_ 5000) (insert (make-string 20 8658) \"\n\")) (goto-char (point-min)) (sit-for 0) (condition-case nil (while t (scroll-up) (sit-for 0)) (error nil)) (run-with-idle-timer 0 nil #'kill-emacs))"
real 0m1.207s
user 0m0.928s
sys 0m0.028s
> If I don't specify the "normal" font in the fontset, only Symbola, or
> if I don't specify fonts at all (Symbola is used by default for the
> character in question), then I get timings like the one below:
I get similar timings.
> . Why is your 1.5 sec timing deemed "unusably slow" vs 0.35 sec
> which is the normal speed?
Because my repro wasn't very good, apparently :) As you see above, your tests takes 1 minute without your patch, and 1 second with it.
> If I use the same session (with
> hundreds of U+21D2 symbols) interactively, the display is quite
> responsive, and 6 sec for scrolling 5000 lines doesn't sound
> "unusable" to me.
Some redisplays cycles takes as much as a few seconds. That's enough to make it impossible to use Emacs. In this concrete example, pressing the up arow introduces a half-second lag. Pressing M-x doesn't show anything for close to .5 seconds. Keeping the down arrow pressed for 1 second stops redisplay until I release the key, and then Emacs stays frozen for tens of seconds before redisplaying anything.
> Are you sure the above program exhibits your
> real-life problem? Is it possible we are chasing the wrong geese
> here?
I this it does exhibit my problem, as we saw above.
> . Why are you setting up your fontset with 2 fonts and claim that
> both support the entire Unicode range (as opposed to adding to the
> fontset just one font for specific ranges of codepoints not
> covered well by the default font)?
Because you asked me for a minimal repro for my bug :) In real life, I have more than 6 fonts, all covering different subsets (I linked to my own config in a previous post in this thread). I don't know exactly what Ubuntu Mono covers, and in fact that changes from time to time, so I just want it to display everything it can (hence the first invocation with 'unicode). Then I want to use Segoe UI for emoji, so I use a range for that. And then I then want Symbola to be used for any symbol that it covers that are not covered by the previous two fonts — hence the second call with 'unicode. I then have a few fonts for various CJK ranges, but even there I don't know what exact range each font covers.
But I guess it boils down to: "⇒" is not the only symbol I use, and I don't want to encode all ranges supported by Symbola explicitly in my emacs config (nor, of course, all the CJK ranges supported by the barious fonts I use for east-asian scripts). As I noted previously, remember that the original bug report didn't even use symbols (I ran into this when trying to edit text written in Chinese in Emacs.
> . Finally, what are the values of the following variables in your
> Emacs used for timings? (I don't see them anywhere in this bug's
> discussions, apologies if I missed something.)
>
> system-configuration-options
> system-configuration-features
In both, system-configuration-options is ""
system-configuration-features is "XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11" in 25.1 (slow), and "XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 LIBSYSTEMD" in master with your patch (fast).
> Bottom line: it is strange that you alone see these problems, and no
> one else AFAIR complained about unusably slow prettify-symbols-mode
> display.
I'm not alone. At least one other person posted to this bug list (https://debbugs.gnu.org/cgi/bugreport.cgi?bug=21028#74) and confirmed that the patch fixed their problem. The problem gets regularly mentioned elsewhere (when I opened this bug I linked to https://github.com/purcell/emacs.d/issues/273 "when I first try to input some chinese characters, it's very slow to moving [...] especially use C-n, C-p, emacs will hang for about 1~2 seconds."; a more recent example is at https://sympa.inria.fr/sympa/arc/coq-club/2017-03/msg00050.html "Appending to the 'unicode list makes emacs unbearably slow."). Additionally, as the maintainer of company-coq, I've had multiple people tell me that it was just too slow to use, only to realize that turning off prettify-symbols-mode was enough to make e
verything snappy again for them.
Clément.
next prev parent reply other threads:[~2017-03-13 16:36 UTC|newest]
Thread overview: 89+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-10 10:34 bug#21028: Performance regression in revision af1a69f4d17a482c359d98c00ef86fac835b5fac (Apr 2014) Clément Pit--Claudel
2015-07-10 12:30 ` Eli Zaretskii
2015-07-10 16:02 ` Clément Pit--Claudel
2015-07-10 12:41 ` Eli Zaretskii
2015-07-10 16:55 ` Clément Pit--Claudel
2015-07-15 12:32 ` Dmitry Antipov
2015-07-18 10:24 ` Clément Pit--Claudel
2015-07-18 11:16 ` Clément Pit--Claudel
2015-07-18 11:26 ` Eli Zaretskii
2015-07-18 20:08 ` Clément Pit--Claudel
2016-03-03 6:12 ` Clément Pit--Claudel
2016-03-03 6:42 ` Clément Pit--Claudel
2016-03-03 7:08 ` Clément Pit--Claudel
2016-03-03 7:33 ` Clément Pit--Claudel
2016-03-03 17:10 ` Glenn Morris
2016-03-03 17:28 ` Clément Pit--Claudel
2016-03-03 20:27 ` Eli Zaretskii
2016-07-20 21:26 ` Clément Pit--Claudel
2016-07-21 14:21 ` Eli Zaretskii
2016-07-21 14:33 ` Clément Pit--Claudel
2016-07-23 20:50 ` Clément Pit--Claudel
2016-10-04 22:17 ` Clément Pit--Claudel
2016-10-26 17:15 ` Clément Pit--Claudel
2016-10-27 14:38 ` Eli Zaretskii
2016-10-27 15:29 ` Clément Pit--Claudel
2016-10-27 15:55 ` Eli Zaretskii
2016-10-28 14:23 ` Clément Pit--Claudel
2016-10-28 14:33 ` Eli Zaretskii
2016-11-18 8:55 ` Eli Zaretskii
2016-12-18 17:33 ` Clément Pit--Claudel
2016-12-18 17:37 ` Eli Zaretskii
2016-12-18 18:04 ` Clément Pit--Claudel
2016-12-18 19:52 ` Eli Zaretskii
2016-12-18 20:44 ` Clément Pit--Claudel
2016-12-19 15:50 ` Eli Zaretskii
2016-12-19 16:25 ` Clément Pit--Claudel
2016-12-19 16:39 ` Eli Zaretskii
2016-12-19 16:55 ` Clément Pit--Claudel
2016-12-19 16:58 ` Eli Zaretskii
2016-12-19 17:13 ` Clément Pit--Claudel
2016-12-22 16:25 ` Eli Zaretskii
2016-12-22 16:49 ` Clément Pit--Claudel
2016-12-22 18:04 ` Eli Zaretskii
2016-12-22 19:08 ` Clément Pit--Claudel
2017-02-10 4:45 ` Clément Pit--Claudel
2017-03-12 11:38 ` Clément Pit--Claudel
2017-03-12 15:49 ` Eli Zaretskii
2017-03-12 17:24 ` Clément Pit--Claudel
2017-03-12 17:48 ` Eli Zaretskii
2017-03-12 19:19 ` Clément Pit--Claudel
2017-03-13 15:46 ` Eli Zaretskii
2017-03-13 16:36 ` Clément Pit--Claudel [this message]
2017-03-13 17:22 ` Eli Zaretskii
2017-03-13 19:04 ` Clément Pit--Claudel
2017-03-13 20:53 ` Eli Zaretskii
2017-03-14 19:45 ` Clément Pit--Claudel
2017-03-15 15:37 ` Eli Zaretskii
2017-03-14 15:45 ` Eli Zaretskii
2017-03-14 19:35 ` Clément Pit--Claudel
2017-03-15 15:36 ` Eli Zaretskii
2017-03-15 20:46 ` Clément Pit--Claudel
2017-03-16 15:27 ` Eli Zaretskii
2017-03-16 21:23 ` Clément Pit--Claudel
2017-03-17 8:15 ` Eli Zaretskii
2017-04-16 7:48 ` Eli Zaretskii
2017-04-16 15:28 ` Clément Pit--Claudel
2016-12-19 17:00 ` Clément Pit--Claudel
2015-07-10 15:42 ` Glenn Morris
2016-03-03 6:37 ` Clément Pit--Claudel
2016-10-04 18:56 ` Jason Gross
2017-03-13 15:54 ` bug#21028: Slow font rendering in emacs Ralf Jung
2017-03-13 17:05 ` Eli Zaretskii
2017-03-13 18:12 ` Ralf Jung
2017-03-13 20:39 ` Eli Zaretskii
2017-03-14 15:57 ` Ralf Jung
2017-03-14 17:11 ` Eli Zaretskii
2017-03-14 18:50 ` Ralf Jung
2017-03-14 19:16 ` Eli Zaretskii
2017-03-14 19:17 ` Ralf Jung
2017-03-14 20:49 ` John Mastro
2017-03-15 15:40 ` Eli Zaretskii
2017-03-14 15:47 ` Eli Zaretskii
2017-03-14 18:41 ` Ralf Jung
2017-03-14 19:16 ` Eli Zaretskii
2017-03-14 19:39 ` Ralf Jung
2017-03-14 19:45 ` Ralf Jung
2017-03-15 15:36 ` Eli Zaretskii
2017-04-22 8:54 ` Ralf Jung
2017-04-22 13:40 ` Eli Zaretskii
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=1e7bc066-3f29-3897-5039-de7233efc58a@live.com \
--to=clement.pitclaudel@live.com \
--cc=21028@debbugs.gnu.org \
--cc=eliz@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).