[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#21028: Performance regression in revision af1a69f4d17a482c359d98c00e
From: |
Clément Pit--Claudel |
Subject: |
bug#21028: Performance regression in revision af1a69f4d17a482c359d98c00ef86fac835b5fac (Apr 2014). |
Date: |
Thu, 9 Feb 2017 23:45:24 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 |
On 2016-12-22 14:08, Clément Pit--Claudel wrote:
> On 2016-12-22 13:04, Eli Zaretskii wrote:
>> I would like to try and understand the problem. For that I need a
>> minimal setup that will show the problem while still making sense,
>> i.e. when the characters in the buffer are displayed by the offending
>> font. A setup with a font that is not actually used for display
>> doesn't seem to be sensible; if showing the problem with real
>> characters requires a somewhat more elaborate setup, please show it.
Hi Eli,
Here's a minimal recipe :) I followed these steps:
1. Downloaded a copy of Linux Mint 18.1 at
https://linuxmint.com/edition.php?id=226
2. Installed it in VirtualBox, without proprietary add-ons (I turned on 3D
acceleration in VBox's settings)
3. Installed VirtualBox's guest additions
4. Downloaded Emacs 25.1 from http://ftpmirror.gnu.org/emacs/
5. Extracted it to ~/emacs/emacs-25.1
6. Installed dependencies: sudo apt install libmagickwand-dev libgtk-3-dev
libxpm-dev libjpeg-dev libgif-dev libtiff-dev libgconf2-dev librsvg2-dev
libselinux1-dev libgnutls-dev libxml2-dev libfreetype6-dev libm17n-dev
libotf-dev libsystemd-dev libncurses-dev texinfo
7. Compiled emacs: ./configure; make -j12
8. Ran emacs and confirmed that it was working normally
9. Downloaded XITS Math from
https://raw.githubusercontent.com/khaledhosny/xits-math/master/xits-math.otf
and saved it to ~/.fonts
10. Updated the font cache using fc-cache
11. Ran the following command: src/emacs -Q --eval "(progn (set-fontset-font
\"fontset-startup\" 'unicode \"Ubuntu Mono\" nil) (set-fontset-font
\"fontset-startup\" 'unicode \"XITS Math\" nil 'append) (dotimes (_ 500)
(insert (make-string 20 8658) \"\n\")))"
12. Confirmed that XITS math was in use:
position: 10472 of 10500 (100%), column: 13
character: ⇒ (displayed as ⇒) (codepoint 8658, #o20722, #x21d2)
preferred charset: unicode (Unicode (ISO10646))
code point in charset: 0x21D2
script: symbol
syntax: . which means: punctuation
category: .:Base, h:Korean, j:Japanese
to input: type "C-x 8 RET 21d2" or "C-x 8 RET RIGHTWARDS DOUBLE
ARROW"
buffer code: #xE2 #x87 #x92
file code: #xE2 #x87 #x92 (encoded by coding system utf-8-unix)
display: by this font (glyph code)
xft:-STIX-XITS Math-normal-normal-normal-*-13-*-*-*-*-0-iso10646-1 (#x448)
13. Ran a simple benchmark: time src/emacs -Q --eval "(progn (set-fontset-font
\"fontset-startup\" 'unicode \"Ubuntu Mono\" nil) (set-fontset-font
\"fontset-startup\" 'unicode \"XITS Math\" nil 'append) (dotimes (_ 500)
(insert (make-string 20 8658) \"\n\") (run-with-idle-timer 0 nil
#'kill-emacs)))"
real 0m5.807s
user 0m1.064s
sys 0m1.260s
14. Compared this to the same benchmark without XITS Math: time src/emacs -Q
--eval "(progn (dotimes (_ 500) (insert (make-string 20 8658) \"\n\")
(run-with-idle-timer 0 nil #'kill-emacs)))"
real 0m0.439s
user 0m0.236s
sys 0m0.032s
This sequence of steps yields an unusably slow copy of Emacs. The font setup
in that last step ensures that Emacs falls back to XITS Math for all characters
that Ubuntu Mono does not handle. This is my usual setup for programming with
proof assistants (Agda and Coq), as I want a consistent fallback for symbols
not covered by Ubuntu Mono.
Let me know if this helps! I'll be happy to share a copy of the VM, too, if
needed.
Cheers and thanks for your help,
Clément.
signature.asc
Description: OpenPGP digital signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#21028: Performance regression in revision af1a69f4d17a482c359d98c00ef86fac835b5fac (Apr 2014).,
Clément Pit--Claudel <=