unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#21028: Performance regression in revision af1a69f4d17a482c359d98c00ef86fac835b5fac (Apr 2014).
@ 2015-07-10 10:34 Clément Pit--Claudel
  2015-07-10 12:30 ` Eli Zaretskii
                   ` (4 more replies)
  0 siblings, 5 replies; 89+ messages in thread
From: Clément Pit--Claudel @ 2015-07-10 10:34 UTC (permalink / raw)
  To: 21028

[-- Attachment #1: Type: text/plain, Size: 6038 bytes --]

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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 89+ messages in thread

end of thread, other threads:[~2017-04-22 13:40 UTC | newest]

Thread overview: 89+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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).