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: Stefan Kangas <stefan <at> marxist.se>
To: Noam Postavsky <npostavs <at> gmail.com>
Cc: 30539 <at> debbugs.gnu.org, Drew Adams <drew.adams <at> oracle.com>
Subject: bug#30539: 26.0; `char-displayable-p' is much slower in Emacs 25 and 26
Date: Wed, 18 Nov 2020 07:35:06 -0800
Noam Postavsky <npostavs <at> gmail.com> writes:

> Drew Adams <drew.adams <at> oracle.com> writes:
>
>> Can someone please confirm that they can repro this problem?
>
> I can reproduce on a Windows 10 box.  It looks like something was being
> cached before, where now it's not.  E.g., try the following function
> (char-names as defined in your throw-mule-bug-2.el).  In Emacs 24,
> there's only one slow call.
>
> (defun my-test-each-char ()
>   (interactive)
>   (view-echo-area-messages)
>   (pcase-dolist (`(,name . ,ch) char-names)
>     (read-char (format "continue? (next: %s)" name))
>     (let ((t0 (current-time))
>           dt displayable)
>       (setq displayable (char-displayable-p ch))
>       (setq dt (subtract-time (current-time) t0))
>       (message "%s display:%s (%fs)" name displayable (float-time dt)))))
>
> 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?




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.