From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#30539: 26.0; `char-displayable-p' is much slower in Emacs 25 and 26 Date: Thu, 22 Feb 2018 18:43:21 -0800 (PST) Message-ID: References: <8c79c39f-7abb-4591-a676-17fb46af5a8f@default> <923b8123-937d-4ffb-9988-5359fdcbb6bc@default> <87woz44grg.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1519353869 14761 195.159.176.226 (23 Feb 2018 02:44:29 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 23 Feb 2018 02:44:29 +0000 (UTC) Cc: 30539@debbugs.gnu.org To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Feb 23 03:44:25 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ep3LU-0003PP-Cb for geb-bug-gnu-emacs@m.gmane.org; Fri, 23 Feb 2018 03:44:24 +0100 Original-Received: from localhost ([::1]:42174 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ep3NW-0004aI-Lr for geb-bug-gnu-emacs@m.gmane.org; Thu, 22 Feb 2018 21:46:30 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43407) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ep3MD-0004Pk-7C for bug-gnu-emacs@gnu.org; Thu, 22 Feb 2018 21:46:22 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ep3L9-0003GH-1v for bug-gnu-emacs@gnu.org; Thu, 22 Feb 2018 21:45:09 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:49083) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ep3L8-0003Eq-H2 for bug-gnu-emacs@gnu.org; Thu, 22 Feb 2018 21:44:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ep3L8-00006V-5y for bug-gnu-emacs@gnu.org; Thu, 22 Feb 2018 21:44:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 23 Feb 2018 02:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30539 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 30539-submit@debbugs.gnu.org id=B30539.1519353823365 (code B ref 30539); Fri, 23 Feb 2018 02:44:02 +0000 Original-Received: (at 30539) by debbugs.gnu.org; 23 Feb 2018 02:43:43 +0000 Original-Received: from localhost ([127.0.0.1]:56980 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ep3Ko-00005p-VX for submit@debbugs.gnu.org; Thu, 22 Feb 2018 21:43:43 -0500 Original-Received: from userp2130.oracle.com ([156.151.31.86]:34386) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ep3Km-00005a-Vk for 30539@debbugs.gnu.org; Thu, 22 Feb 2018 21:43:41 -0500 Original-Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w1N2gStJ049121; Fri, 23 Feb 2018 02:43:33 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2017-10-26; bh=5tCgj7Xzqyp/0Hw6tIrlH8lT8rMGSCbss8Bsm0Uy6HI=; b=DaTPdp2lPx28pM9pyM5MoSedxUvHYadcL6/pYLvsafb3s4SK3KPgqlPetA5n4jqp0G7n 5tzFHZYzXbMufbDZE8aubodMbHEIC4CcwiBihpKQ5V8e9mYKL5P38q108Cg+L3ge/iX3 aUrMHbMlc4hl7zHBb9rBGkvlXlqUJm1P1IXlt7c464DrfaZPVOc3dVPavlyCY/afdwXn oP752ewMVKEchOkmpYHQUPwbPecw2/mjhAmTBV/SzeP8hZfaCh0qfOe1E8lqyqpqEBBE zqxZPSC3wgBIxGUC/Zk67+V5EzmobT+IULm174Nsblwp66QNSd1UiiTK1UAQosmbGYav xA== Original-Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2130.oracle.com with ESMTP id 2ga9xbr3bd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 23 Feb 2018 02:43:33 +0000 Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w1N2hW2s013838 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 23 Feb 2018 02:43:32 GMT Original-Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w1N2hURK023899; Fri, 23 Feb 2018 02:43:32 GMT In-Reply-To: <87woz44grg.fsf@gmail.com> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4654.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8812 signatures=668677 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1802230029 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:143611 Archived-At: > > Can someone please confirm that they can repro this problem? >=20 > 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. >=20 > (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))))) >=20 > Doing (setq inhibit-compacting-font-caches t) brings back reasonable > performance. >=20 > 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. Thanks, Noam. Yes, I see the same thing: over 4 sec for each char that is not displayable. I couldn't try your code with Emacs 24.5 because `pcase-dolist' and `inhibit-compacting-font-caches' are both undefined. (How did you test it in 24.5, or did I misunderstand you?) But everything else you say checks out, including the effect of (setq inhibit-compacting-font-caches t). Is this a bug that is likely to get fixed? In any case, for Emacs 25-26, I wonder whether I should bind `inhibit-compacting-font-caches to `t' in my code that uses `char-displayable-p', or whether I should just skip the `char-displayable-p' test for Emacs 25-26. Another question is whether this bug should/will affect all users or only some? If the latter then I can let users decide whether to test `char-displayable-p' (I have an option for that anyway) or whether to bind `inhibit-compacting-font-caches to `t'. If only some users are affected by the bug, do we know why? Does it have to do with the fonts they have installed, for example?