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: Clément Pit--Claudel
Subject: bug#21028: Performance regression in revision af1a69f4d17a482c359d98c00ef86fac835b5fac (Apr 2014).
Date: Fri, 10 Jul 2015 03:34:23 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

Hi all,

I noticed a performance regression between 24.3 and 25.0.50, connected to CJK 
fonts. The following steps reproduce the issue in master:

1. emacs -Q, and open the scratch buffer
2. Run the following code:
    (progn
     (dotimes (_ 3)
       (set-fontset-font t 'unicode (font-spec :name "Arial") nil 'append))
     (dotimes (_ 50)  
       (insert "日本国\n")))
3. Move the cursor around. Notice that motion is extremely slow (in particular 
C-p and C-n). So is shift-selection. (if it is not, try increasing the 3 above, 
maybe to 5 or 10).

This test case is the smallest I could come up with; there might be other ways 
to trigger the problem. In my particular case, it is caused by having 10 or so 
distinct fontset rules, covering different blocks of characters. This problem 
was mentioned elsewhere online too (for example 
https://github.com/purcell/emacs.d/issues/273).

I tried to pinpoint the commit that introduced the bug, and found revision 
af1a69f4d17a482c359d98c00ef86fac835b5fac by bisecting between 24.3 and master. 
Here's the commit in question:

  af1a69f4d17a482c359d98c00ef86fac835b5fac is the first bad commit
  commit af1a69f4d17a482c359d98c00ef86fac835b5fac
  Author: Dmitry Antipov <dmantipov@yandex.ru>
  Date:   Wed Apr 2 17:24:19 2014 +0400

      * font.c (font_list_entities): Do not add empty vector to font cache.
      (font_matching_entity): Likewise.  If matching entity is found, insert
      1-item vector with this entity instead of entity itself (Bug#17125).

  :040000 040000 2065e6bd6470194ed976fc343a0fd8932cc88a6c 
73da4b1e64a36b066c965e70b9a0ba79c091336d M    src

(by the way, the process was a bit slow; is there a way to make builds faster, 
maybe by building only the emacs binary? `make src/emacs` does not work, and 
`make src` spends some time loading el files and generating autoloads)

I added the full bisect log below. Is there any extra info that I should 
provide?
Thanks!
Clément.

---

git bisect start
# bad: [53cf3cfec12250d89790482d031f95a3cd5c484a] Don't check the exit status, 
it can be misleading
git bisect bad 53cf3cfec12250d89790482d031f95a3cd5c484a
# good: [24958590a00900371b6b3b154fc1df5c980d056c] Add 24.3 release to 
ChangeLogs
git bisect good 24958590a00900371b6b3b154fc1df5c980d056c
# good: [d16ae6228826c561bdb3701bd65d7517bd9e30d5] * fns.c (Frandom): Fix rare 
bug where the result isn't random.
git bisect good d16ae6228826c561bdb3701bd65d7517bd9e30d5
# bad: [935fa6151b3e411c5308d62338744ff25f1a8ddb] * lisp/textmodes/css-mode.el 
(scss-mode): Fix typo.
git bisect bad 935fa6151b3e411c5308d62338744ff25f1a8ddb
# skip: [e6a4c15ff1a2dad24eb695d0f9f1e63398aadf9f] * 
lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Use mode function name 
instead of variable name in hook docstring.  (Bug#18349)
git bisect skip e6a4c15ff1a2dad24eb695d0f9f1e63398aadf9f
# bad: [774da90d8c23f3b27194fb5c82e8b1ccdb77aae2] Mention new whitespace-mode 
option: big-indent.
git bisect bad 774da90d8c23f3b27194fb5c82e8b1ccdb77aae2
# bad: [18b345686d6a6f00eadb866b541b4f458fcfdb02] ps-samp.el: Make it slightly 
less awful
git bisect bad 18b345686d6a6f00eadb866b541b4f458fcfdb02
# bad: [aabbbc45793415e1cf41b61abb1737e296d60409] Merge from emacs-24; up to 
2014-05-08T06:58:46Z!rgm@gnu.org
git bisect bad aabbbc45793415e1cf41b61abb1737e296d60409
# skip: [551a89e12d1ac5198a4de25ce24d98358bb1f8db] Standardize case of 
"Front-Cover Texts" in texi file permissions notices.
git bisect skip 551a89e12d1ac5198a4de25ce24d98358bb1f8db
# skip: [7b207d6d4f2de3ee07ffc8b02464c2b186372970] Improve usage of AC_INIT
git bisect skip 7b207d6d4f2de3ee07ffc8b02464c2b186372970
# skip: [1e1a3a324856cf7480030b6dbd7f4476c5130ad9] Correct merge
git bisect skip 1e1a3a324856cf7480030b6dbd7f4476c5130ad9
# skip: [1730d9634acba46a173ae8ef6afc853602424dd6] ede autoload tweak
git bisect skip 1730d9634acba46a173ae8ef6afc853602424dd6
# skip: [76377e461836419770c548872e5d88c6e111439c] * internals.texi (C 
Dialect): New section.
git bisect skip 76377e461836419770c548872e5d88c6e111439c
# skip: [4f3a895b33178230e27d5ad2fb81d5a3f5aa5d9e] * lisp/simple.el 
(cycle-spacing--context, cycle-spacing): Doc tweaks.
git bisect skip 4f3a895b33178230e27d5ad2fb81d5a3f5aa5d9e
# good: [d1ff9ee403221755ccc259e86e2112959f881047] * minibuf.c (read_minibuf): 
Avoid C99ism in previous patch.
git bisect good d1ff9ee403221755ccc259e86e2112959f881047
# bad: [1b058e42524353c9ff133ea330876ed2d39b6515] ChangeLog fix
git bisect bad 1b058e42524353c9ff133ea330876ed2d39b6515
# good: [0b4fe0787b957624ebffa5d123c69d5c0a5d69e2] Doc tweaks related to file 
locking
git bisect good 0b4fe0787b957624ebffa5d123c69d5c0a5d69e2
# good: [5c30ab7a71cbd9ca50e2baa2baad595005f5e5f3] vhdl-mode.el small fixup
git bisect good 5c30ab7a71cbd9ca50e2baa2baad595005f5e5f3
# good: [200c532bd04a67a89db602462d74706051c61178] Inhibit quote autopairing 
more frequently
git bisect good 200c532bd04a67a89db602462d74706051c61178
# bad: [3a9e7a49deea49088a773c321e52185e922748d6] * make-dist: Further update 
AC_INIT regexp.
git bisect bad 3a9e7a49deea49088a773c321e52185e922748d6
# bad: [4fd68bf6cc1dce6c95001fbbac95cef32c86359d] Revert subr.el workaround for 
GC bug.
git bisect bad 4fd68bf6cc1dce6c95001fbbac95cef32c86359d
# bad: [09aba8153a8297e415477dbfa9a8c7e999fb3457] Merge from emacs-24; up to 
2014-03-28T01:39:30Z!rgm@gnu.org
git bisect bad 09aba8153a8297e415477dbfa9a8c7e999fb3457
# bad: [af1a69f4d17a482c359d98c00ef86fac835b5fac] * font.c 
(font_list_entities): Do not add empty vector to font cache. 
(font_matching_entity): Likewise.  If matching entity is found, insert 1-item 
vector with this entity instead of entity itself (Bug#17125).
git bisect bad af1a69f4d17a482c359d98c00ef86fac835b5fac
# first bad commit: [af1a69f4d17a482c359d98c00ef86fac835b5fac] * font.c 
(font_list_entities): Do not add empty vector to font cache. 
(font_matching_entity): Likewise.  If matching entity is found, insert 1-item 
vector with this entity instead of entity itself (Bug#17125).

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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