GNU bug report logs - #30539
26.0; `char-displayable-p' is much slower in Emacs 25 and 26

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Mon, 19 Feb 2018 22:09:02 UTC

Severity: minor

Found in version 26.0

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Drew Adams <drew.adams <at> oracle.com>
Subject: bug#30539: closed (Re: bug#30539: 26.0; `char-displayable-p' is
 much slower in Emacs 25 and 26)
Date: Wed, 18 Nov 2020 18:31:03 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#30539: 26.0; `char-displayable-p' is much slower in Emacs 25 and 26

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 30539 <at> debbugs.gnu.org.

-- 
30539: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=30539
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Stefan Kangas <stefan <at> marxist.se>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: npostavs <at> gmail.com, 30539-done <at> debbugs.gnu.org
Subject: Re: bug#30539: 26.0; `char-displayable-p' is much slower in Emacs 25
 and 26
Date: Wed, 18 Nov 2020 10:30:08 -0800
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Stefan Kangas <stefan <at> marxist.se>
>> Date: Wed, 18 Nov 2020 07:35:06 -0800
>> Cc: 30539 <at> debbugs.gnu.org
>>
>> > Doing (setq inhibit-compacting-font-caches t) brings back reasonable
>> > performance.
>> >
>> > I can't reproduce on my GNU/Linux box, although that may just be due to
>> > different fonts installed.  In particular, char-displayable-p never gave
>> > me nil.
>>
>> Given this change:
>>
>> commit f34f49f35e5c000a6ee070678f43d2ca38b76cad
>> Author: Eli Zaretskii <eliz <at> gnu.org>
>> Date:   Sat Sep 7 12:26:08 2019 +0300
>>
>>     Set inhibit-compacting-font-caches to t by default on MS-Windows
>>
>> Is there anything left to do here, or should this bug be closed?
>
> If the problem doesn't happen on GNU/Linux, we can close this.

I think this is Windows specific indeed.  Closing.

[Message part 3 (message/rfc822, inline)]
From: Drew Adams <drew.adams <at> oracle.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.0; `char-displayable-p' is much slower in Emacs 25 and 26
Date: Mon, 19 Feb 2018 14:07:40 -0800 (PST)
[Message part 4 (text/plain, inline)]
This is not from emacs -Q, and I do have many fonts installed.  I
repeated it from emacs -Q and I've attached those profiler reports
also.  But with emacs -Q the test code (`my-test') finished
immediately.  With my setup it took many seconds.  I use this font
by default - dunno whether that makes the difference:

(font . "-outline-Lucida Console-normal-normal-normal-mono-4-*-*-*-c-*-iso8859-1")
(font-parameter . "-*-Lucida Console-normal-r-*-*-14-*-*-*-c-*-iso8859-1")

Recipe I followed:

Evaluate the attached code (`throw-mule-bug.el'), then look at buffers
*CPU Profiler Report* and *Memory Profiler Report*.  I've attached these
reports as files:

throw-mule-bug-memory-report-E26-Q - Emacs 26 from emacs -Q
throw-mule-bug-cpu-report-E26-Q    - Emacs 26 from emacs -Q
throw-mule-bug-memory-report-E24 - Emacs 24.5 with my setup
throw-mule-bug-cpu-report-E24    - Emacs 24.5 with my setup
throw-mule-bug-memory-report-E26 - Emacs 26P2 with my setup
throw-mule-bug-cpu-report-E26    - Emacs 26P2 with my setup
 
In Emacs 25.3.1 and 26 `char-displayable-p' is MUCH slower
than it is in Emacs 24.5.  In 24.5 the evaluation of `my-test'
seems instantaneous.  In Emacs 26 it takes many seconds.

From the reports, using my setup:

E26 memory:

- my-delete-if-not                         225,165,075  52%
 - let                                     222,218,069  51%
  - while                                  222,218,069  51%
   - if                                    222,218,069  51%
    - not                                  222,218,069  51%
     - funcall                             222,218,069  51%
      - my-char-displayable-p              222,218,069  51%
       - char-displayable-p                222,218,069  51%
        - cond                             222,218,069  51%
           let                             189,022,646  43%
 - while                                     2,947,006   0%
  - and                                      2,947,006   0%
   - not                                     2,947,006   0%
    - funcall                                2,947,006   0%
     - my-char-displayable-p                 2,947,006   0%
      - char-displayable-p                   2,947,006   0%
       - cond                                2,947,006   0%
          let                                1,836,898   0%

E26 cpu:

- my-delete-if-not                                1609  70%
 - let                                            1602  70%
  - while                                         1602  70%
   - if                                           1602  70%
    - not                                         1602  70%
     - funcall                                    1602  70%
      - my-char-displayable-p                     1602  70%
       - char-displayable-p                       1602  70%
        - cond                                    1602  70%
           let                                    1602  70%
 - while                                             7   0%
  - and                                              7   0%
   - not                                             7   0%
    - funcall                                        7   0%
     - my-char-displayable-p                         7   0%
      - char-displayable-p                           7   0%
       - cond                                        7   0%
          let                                        7   0%

In GNU Emacs 26.0.91 (build 1, x86_64-w64-mingw32)
 of 2018-01-22
Repository revision: 752fba992b793a74d202c9cfc3e1a92fd458e748
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --without-dbus --host=x86_64-w64-mingw32
 --without-compress-install 'CFLAGS=-O2 -static -g3''
[throw-mule-bug-cpu-report-E26 (application/octet-stream, attachment)]
[throw-mule-bug-memory-report-E26-Q (application/octet-stream, attachment)]
[throw-mule-bug-cpu-report-E26-Q (application/octet-stream, attachment)]
[throw-mule-bug-memory-report-E24 (application/octet-stream, attachment)]
[throw-mule-bug-cpu-report-E24 (application/octet-stream, attachment)]
[throw-mule-bug-memory-report-E26 (application/octet-stream, attachment)]
[throw-mule-bug.el (application/octet-stream, attachment)]

This bug report was last modified 4 years and 180 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.