bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#21028: Performance regression in revision af1a69f4d17a482c359d98c00e


From: Eli Zaretskii
Subject: bug#21028: Performance regression in revision af1a69f4d17a482c359d98c00ef86fac835b5fac (Apr 2014).
Date: Thu, 22 Dec 2016 18:25:30 +0200

> Cc: 21028@debbugs.gnu.org
> From: Clément Pit--Claudel <clement.pit@gmail.com>
> Date: Mon, 19 Dec 2016 12:13:31 -0500
> 
> Here is a concrete experiment:
> 
> # With :name
> $ time /build/emacs/25/src/emacs -Q -l 21028.el 21028.fixed --eval 
> "(run-with-idle-timer 0 0 (lambda () (forward-line 25) (redisplay) 
> (run-with-idle-timer 0 0 'kill-emacs)))"
> 
> real  0m3.500s
> user  0m1.400s
> sys   0m0.824s
> 
> 
> # With :family and :registry
> $ time /build/emacs/25/src/emacs -Q -l 21028.fixed.el 21028.fixed --eval 
> "(run-with-idle-timer 0 0 (lambda () (forward-line 25) (redisplay) 
> (run-with-idle-timer 0 0 'kill-emacs)))"
> 
> real  0m1.487s
> user  0m0.752s
> sys   0m0.188s
> 
> 
> # With your patch from last month applied and the original one reverted:
> $ time /build/emacs/master/src/emacs -Q -l 21028.fixed.el 21028.fixed --eval 
> "(run-with-idle-timer 0 0 (lambda () (forward-line 25) (redisplay) 
> (run-with-idle-timer 0 0 'kill-emacs)))"
> 
> real  0m0.486s
> user  0m0.236s
> sys   0m0.028s

I indeed see slow redisplay with your test files (but only after
changing 'append' to 'prepend', because otherwise Emacs selects a
different font for the arrows).  But when I looked at the display
closely, I found that the arrows are not displayed using Segoe UI
Emoji font, they are displayed by some other font.  In fact, the only
characters in that test which use the Segoe UI Emoji font are blanks!
Did you try using "C-u C-x =" to see which characters are displayed
using the Emoji font in your case?

I think that's because Segoe UI Emoji doesn't have glyphs for the
arrows, at least on my system.  So I modified your 21028.fixed.el
recipe as follows:

  (dolist (frame (frame-list))
    (dolist (fontset (fontset-list))
      (set-fontset-font fontset 'unicode (font-spec :family "Segoe UI Symbol" 
:registry "iso10646-1") frame 'prepend)
      (set-fontset-font fontset 'unicode (font-spec :family "XITS 
Math":registry "iso10646-1") frame 'prepend)))

  (setq-default prettify-symbols-alist '(("=>" . 8658) (":=" . 8796)))

and the problem went away: the arrows are displayed using Segoe UI
Symbol (which, at least on my system, includes both symbols and
Emoji), and there's no slowdown anymore.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]