From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Klaus-Dieter Bauer Newsgroups: gmane.emacs.bugs Subject: bug#24918: 25.1; Fonts can make Emacs grind to a halt Date: Wed, 30 Nov 2016 11:01:32 +0100 Message-ID: References: <8360nvfedz.fsf@gnu.org> <83inrue97n.fsf@gnu.org> <83lgwc96nn.fsf@gnu.org> <83lgw3zjvf.fsf@gnu.org> <83inr6xjnv.fsf@gnu.org> <83vav5r5tp.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=f403045ec68eee4250054281cb39 X-Trace: blaine.gmane.org 1480500206 29896 195.159.176.226 (30 Nov 2016 10:03:26 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 30 Nov 2016 10:03:26 +0000 (UTC) Cc: 24918@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Nov 30 11:03:16 2016 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 1cC1jP-0006On-NK for geb-bug-gnu-emacs@m.gmane.org; Wed, 30 Nov 2016 11:03:16 +0100 Original-Received: from localhost ([::1]:42407 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cC1jT-0008Ra-AY for geb-bug-gnu-emacs@m.gmane.org; Wed, 30 Nov 2016 05:03:19 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36400) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cC1jH-0008Nv-DI for bug-gnu-emacs@gnu.org; Wed, 30 Nov 2016 05:03:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cC1jC-0002bx-Lc for bug-gnu-emacs@gnu.org; Wed, 30 Nov 2016 05:03:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59801) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cC1jC-0002bZ-It for bug-gnu-emacs@gnu.org; Wed, 30 Nov 2016 05:03:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cC1jC-0008HD-5H for bug-gnu-emacs@gnu.org; Wed, 30 Nov 2016 05:03:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Klaus-Dieter Bauer Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 Nov 2016 10:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24918 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24918-submit@debbugs.gnu.org id=B24918.148050013131758 (code B ref 24918); Wed, 30 Nov 2016 10:03:02 +0000 Original-Received: (at 24918) by debbugs.gnu.org; 30 Nov 2016 10:02:11 +0000 Original-Received: from localhost ([127.0.0.1]:46967 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cC1iM-0008G9-Vk for submit@debbugs.gnu.org; Wed, 30 Nov 2016 05:02:11 -0500 Original-Received: from mail-lf0-f48.google.com ([209.85.215.48]:35911) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cC1iL-0008Fx-Cr for 24918@debbugs.gnu.org; Wed, 30 Nov 2016 05:02:10 -0500 Original-Received: by mail-lf0-f48.google.com with SMTP id t196so142824090lff.3 for <24918@debbugs.gnu.org>; Wed, 30 Nov 2016 02:02:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=0YPDz/kAJASBgno9ApuQmZsTUYcIDBh2pckj0yj3dNM=; b=IcCPb2ec5/RA/6Y1QQ1gtslIdN9qaBilZit3STaTHYHmCjdYN03GVu5OhrCD2zzGs5 cCxuiVOPaQZzL9AkbzaOE+aGbAZIG1QbgPLoajiBELKLCj45oPP8IscvyStQiKYwN78G UIh2AUuQjguUWdebz3U7afJg3GA3/zIIA38/6z+nYGLh6peJnwmFNayyX/UceNJAbDNg x041IYz/kQm8bc59Wk4w5zSPFfQAGgue18JTHXdE1rHiDl8IX2pPsMjUkj0+bgQlxjiG xN/ZEHatd5CpfONEF+knA49rxBuSujebQDJaYoDYkx7bkD1PpKH2fd22/fWu2dHcWfbu lhLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=0YPDz/kAJASBgno9ApuQmZsTUYcIDBh2pckj0yj3dNM=; b=FpP4oS2irJx6KUUGPIgfVwqRwn5SM++nD/83LVOg7gfadII3Mr5gfVew8VB3JAc9yt px6jXcgN/jFJT3GuEMhuny0ILmNUSJFJFVkge75gxt6pDyKCk9dyuWX2tuT/h0nXvzFS 2Feod52/VQuTH0kRKNGQByNB+aD+hUUP442x5kf17zryhs+cd2jVl0sXtgwiBAYVTPjB rF8E94VDJ/WTJW0qDAbEAva8v6fHMrSi6Kg9E9spIxY0FyCaAiH0yoVDWQUzqn2mNEVg O666rcTyVB5eizIqzr+pTvPJtGM8sfPw+iIRART+7lW9HBJWNKc01EvCB9mo84LS+o1c pRhA== X-Gm-Message-State: AKaTC02pefSXEq5yAgmppeE5xqxg2hTqbJXwlje2Es8bAHdwwF93N86rNuEVTU6IxOQ2rS7fhM+U0iJgHoPsBg== X-Received: by 10.46.78.1 with SMTP id c1mr14572214ljb.39.1480500123148; Wed, 30 Nov 2016 02:02:03 -0800 (PST) Original-Received: by 10.25.203.6 with HTTP; Wed, 30 Nov 2016 02:01:32 -0800 (PST) In-Reply-To: <83vav5r5tp.fsf@gnu.org> 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:126298 Archived-At: --f403045ec68eee4250054281cb39 Content-Type: multipart/alternative; boundary=f403045ec68eee424c054281cb37 --f403045ec68eee424c054281cb37 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 2016-11-30 4:42 GMT+01:00 Eli Zaretskii : > > From: Klaus-Dieter Bauer > > Date: Tue, 29 Nov 2016 23:42:38 +0100 > > Cc: 24918@debbugs.gnu.org > > > > Ah, I missed that line in `C-u C-x =3D'. (I also don't see any message > from Cl=C3=A9ment). > > > > #### Using "emacs -Q" #### > > > > It says for the =E2=87=92 (\Rightarrow) symbol > > display: by this font (glyph code) > > uniscribe:-outline-Malgun Gothic-normal-normal-normal- > sans-17-*-*-*-p-*-ksc5601.1987-0 (#x22D) > > > > For the =E2=80=96 (\Vert) and =E2=80=BB (\textreferencemark) symbols: > > uniscribe:-outline-MS Gothic-normal-normal-normal- > mono-17-*-*-*-c-*-gb2312.1980-0 (#x340) > > > > For the symbol: > > uniscribe:-outline-MS Gothic-normal-normal-normal- > mono-17-*-*-*-c-*-gb2312.1980-0 (#x364) > > > > #### With init file #### > > > > (using Linux Libertine Mono as default font) > > > > The =E2=80=96 and =E2=80=BB symbols work fine in that configuraiton. > > "=E2=87=92" still causes the issue here too, and falls back to identica= lly the > same `uniscribe' line > > uniscribe:-outline-Malgun Gothic-normal-normal-normal- > sans-17-*-*-*-p-*-ksc5601.1987-0 (#x22D) > > > > The extreme lag in `package-list-packages' seems to be caused by the = =E2=96=B2 > symbol in the **header line**, > > which works fine with the default font, but is substituted with > > uniscribe:-outline-Malgun Gothic-normal-normal-normal- > sans-16-*-*-*-p-*-gb2312.1980-0 (#x240) > > when using `Linux Libertine Mono' or `Noto Mono'. > > I think the problem is that these fonts have registry that is not > iso10646-1 (i.e. Unicode). > > Do you have Symbola installed? I'm guessing you don't, and if so, can > you please install it? Emacs by default is configured to use that > font for these symbols, and with the correct registry. > > > By any chance, do any of your test systems run Windows and have MS > Office installed? (In my case the 2010 > > version.) It should be the primary source of Unicode fonts on my system= . > > Yes, I do on one of my machines, and I don't experience these problems > there. > I now installed Symbola. In the real-world cases it solves the problem, but apparently it is not a full solution; Possibly sufficient for practical use, but mostly more efficient at masking the issue. (See especially the example below, where the issue occurs even when no fonts are available at all for a character.) E.g. I used (with-selected-window (display-buffer (get-buffer-create "*foo*")) (goto-char (point-max)) (cl-loop for _ upto 1000 ;; lower the limit if it crashes emacs with lmt =3D (+ 1 (max-char)) for s =3D (string (random lmt)) for col =3D (- (point) (line-beginning-position)) if (< 30 col) do (insert "\n") do (insert s))) to generate random unicode characters; For most no font is found at all (a hex-rectangle is displayed instead) display: no font available but some characters will be generated, where problematic fonts still come up. Additionally, one generated line was also heavily laggy, *despite all characters saying "no font available"*, i.e. even *without* font substitution. I attached the line as "*problematic-line.txt*". Navigating into or out of this line =E2=80=93 or from one character to the next, for a= bout half the characters in the line, talks roughly 1 second on my system. For this file, behaviour with (setq inhibit-compacting-font-caches t) was also somewhat inconsistent. - Setting the variable to t always fixed the lag. - Setting the variable back to nil keeps the buffer lag-free for a while, but then suddenly emacs froze completely. --------------------------- Since I don't know if attachments are archived, I also attach a the "problematic-line.txt" as hexl/base64 dump. 00000000: 2d2a 2d20 6d6f 6465 3a20 7465 7874 3b20 -*- mode: text; 00000010: 636f 6469 6e67 3a20 7574 662d 382d 656d coding: utf-8-em 00000020: 6163 733b 202d 2a2d 0d0a f6be a7a9 f1b5 acs; -*-........ 00000030: 8485 f888 9194 94f8 8a90 a281 f88b 908e ................ 00000040: 84f8 8a98 9a9a f686 a9be f88b 8396 b5f5 ................ 00000050: ac8d 8ff8 8abe a1aa f88d a4aa 9ef3 8ab8 ................ 00000060: 9cf8 8eb0 9bbf f7a7 a6ae f7a7 848b f586 ................ 00000070: 93ab f280 b382 f88d 958a 9ff2 a1ac 86f8 ................ 00000080: 8fa0 9784 f3b5 849b f6b7 93ae f889 b4aa ................ 00000090: a2ef a39b f88a 9b96 a4f8 8dae b4b6 f88a ................ 000000a0: a9b6 bdf3 b29f a7f8 89bb 85b5 f682 a188 ................ 000000b0: f88a a0a3 810d 0a ....... LSotIG1vZGU6IHRleHQ7IGNvZGluZzogdXRmLTgtZW1hY3M7IC0qLQ0K9r6nqfG1hIX4iJGUlPi= K kKKB+IuQjoT4ipiamvaGqb74i4OWtfWsjY/4ir6hqviNpKqe84q4nPiOsJu/96emrvenhIv1hpO= r 8oCzgviNlYqf8qGshviPoJeE87WEm/a3k674ibSqou+jm/iKm5ak+I2utLb4iqm2vfOyn6f4ibu= F tfaCoYj4iqCjgQ0K --f403045ec68eee424c054281cb37 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
2016-11-30 4:42 GMT+01:00 Eli Zaretskii <eliz@gnu.org= >:
> From: Klaus-Dieter = Bauer <bauer.klaus.diete= r@gmail.com>
> Date: Tue, 29 Nov 2016 23:42:38 +0100
> Cc: 24918@debbugs.gnu.org=
>
> Ah, I missed that line in `C-u C-x =3D'. (I also don't see any= message from Cl=C3=A9ment).
>
> #### Using "emacs -Q" ####
>
> It says for the =E2=87=92 (\Rightarrow) symbol
> display: by this font (glyph code)
> uniscribe:-outline-Malgun Gothic-normal-normal-normal-sans-17-*-*= -*-p-*-ksc5601.1987-0 (#x22D)
>
> For the =E2=80=96 (\Vert) and =E2=80=BB (\textreferencemark) symbols:<= br> > uniscribe:-outline-MS Gothic-normal-normal-normal-mono-17-*-*-*-c= -*-gb2312.1980-0 (#x340)
>
> For the symbol:
> uniscribe:-outline-MS Gothic-normal-normal-normal-mono-17-*-*-*-c= -*-gb2312.1980-0 (#x364)
>
> #### With init file ####
>
> (using Linux Libertine Mono as default font)
>
> The =E2=80=96 and =E2=80=BB symbols work fine in that configuraiton. > "=E2=87=92" still causes the issue here too, and falls back = to identically the same `uniscribe' line
> uniscribe:-outline-Malgun Gothic-normal-normal-normal-sans-17-*-*= -*-p-*-ksc5601.1987-0 (#x22D)
>
> The extreme lag in `package-list-packages' seems to be caused by t= he =E2=96=B2 symbol in the **header line**,
> which works fine with the default font, but is substituted with
> uniscribe:-outline-Malgun Gothic-normal-normal-normal-sans-16-*-*= -*-p-*-gb2312.1980-0 (#x240)
> when using `Linux Libertine Mono' or `Noto Mono'.

I think the problem is that these fonts have registry that is not iso10646-1 (i.e. Unicode).

Do you have Symbola installed?=C2=A0 I'm guessing you don't, and if= so, can
you please install it?=C2=A0 Emacs by default is configured to use that
font for these symbols, and with the correct registry.

> By any chance, do any of your test systems run Windows and have MS Off= ice installed? (In my case the 2010
> version.) It should be the primary source of Unicode fonts on my syste= m.

Yes, I do on one of my machines, and I don't experience these pr= oblems
there.


I now installed Symbola. In the real-world cases it solve= s the problem, but apparently it is not a full solution; Possibly sufficien= t for practical use, but mostly more efficient at masking the issue. (See e= specially the example below, where the issue occurs even when no fonts are = available at all for a character.)

E.g. I used=C2=A0

(with-selected-window
=C2=A0 =C2=A0 (d= isplay-buffer (get-buffer-create "*foo*"))
=C2=A0 (goto= -char (point-max))
=C2=A0 (cl-loop for _ upto 1000 ;; lower the l= imit if it crashes emacs
=C2=A0=C2=A0 with lmt =3D (+ 1 (max-char))
=C2=A0=C2=A0 for s =3D (string (random lmt))
=C2=A0=C2=A0 for co= l =3D (- (point) (line-beginning-position))
=C2=A0=C2=A0 if (< 30 = col) do (insert "\n")
=C2=A0=C2=A0 do (insert s)))

to generate random unicode characters; For most no f= ont is found at all (a hex-rectangle is displayed instead)=C2=A0
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 display: no font available=
but some characters will be generated, where problematic fonts s= till come up.

Additionally, one generated line was= also heavily laggy,=C2=A0despite all characters saying "no font av= ailable", i.e. even=C2=A0without=C2=A0font substitution. I = attached the line as "problematic-line.txt". Navigating in= to or out of this line =E2=80=93 or from one character to the next, for abo= ut half the characters in the line, talks roughly 1 second on my system.=C2= =A0

For this file, behaviour with (setq inhibit-co= mpacting-font-caches t) was also somewhat inconsistent.=C2=A0
- S= etting the variable to t always fixed the lag.
- Setting the vari= able back to nil keeps the buffer lag-free for a while, but then suddenly e= macs froze completely.=C2=A0

---------------------= ------

Since I don't know if attachments are a= rchived, I also attach a the "problematic-line.txt" as hexl/base6= 4 dump.

00000000: 2d2a 2d20 6d6f 6465 3a20 7465 7874 3b20 =C2=A0-*- mode:= text;
0000= 0010: 636f 6469 6e67 3a20 7574 662d 382d 656d =C2=A0coding: utf-8-em=
00000020: 6163 73= 3b 202d 2a2d 0d0a f6be a7a9 f1b5 =C2=A0acs; -*-........
00000030: 8485 f888 9194 94f8 = 8a90 a281 f88b 908e =C2=A0................
00000040: 84f8 8a98 9a9a f686 a9be f88b 839= 6 b5f5 =C2=A0................
00000050: ac8d 8ff8 8abe a1aa f88d a4aa 9ef3 8ab8 =C2=A0= ................
00000060: 9cf8 8eb0 9bbf f7a7 a6ae f7a7 848b f586 =C2=A0............= ....
000000= 70: 93ab f280 b382 f88d 958a 9ff2 a1ac 86f8 =C2=A0................
00000080: 8fa0 9784= f3b5 849b f6b7 93ae f889 b4aa =C2=A0................
00000090: a2ef a39b f88a 9b96 a4= f8 8dae b4b6 f88a =C2=A0................
000000a0: a9b6 bdf3 b29f a7f8 89bb 85b5 f682 = a188 =C2=A0................
000000b0: f88a a0a3 810d 0a =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0.......
=

=
LSotIG1vZGU6IHRleH= Q7IGNvZGluZzogdXRmLTgtZW1hY3M7IC0qLQ0K9r6nqfG1hIX4iJGUlPiK
kKKB+IuQjoT4ipiamvaGqb74i4O= WtfWsjY/4ir6hqviNpKqe84q4nPiOsJu/96emrvenhIv1hpOr
8oCzgviNlYqf8qGshviPoJeE87WEm/a3k674= ibSqou+jm/iKm5ak+I2utLb4iqm2vfOyn6f4ibuF
tfaCoYj4iqCjgQ0K
--f403045ec68eee424c054281cb37-- --f403045ec68eee4250054281cb39 Content-Type: text/plain; charset=CP932; name="problematic-line.txt" Content-Disposition: attachment; filename="problematic-line.txt" Content-Transfer-Encoding: base64 X-Attachment-Id: f_iw4qxzuy0 LSotIG1vZGU6IHRleHQ7IGNvZGluZzogdXRmLTgtZW1hY3M7IC0qLQ0K9r6nqfG1hIX4iJGUlPiK kKKB+IuQjoT4ipiamvaGqb74i4OWtfWsjY/4ir6hqviNpKqe84q4nPiOsJu/96emrvenhIv1hpOr 8oCzgviNlYqf8qGshviPoJeE87WEm/a3k674ibSqou+jm/iKm5ak+I2utLb4iqm2vfOyn6f4ibuF tfaCoYj4iqCjgQ0K --f403045ec68eee4250054281cb39--