unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Will Bush <will.g.bush@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: "Basil L. Contovounesios" <contovob@tcd.ie>,
	Robert Pluim <rpluim@gmail.com>,
	40733@debbugs.gnu.org, James Cloos <cloos@jhcloos.com>
Subject: bug#40733: 28.0.50; Emacs locks up on paste (yank) of unicode characters
Date: Mon, 1 Jun 2020 06:19:02 -0500	[thread overview]
Message-ID: <CA+aYz4QssnSS3eMuYYkXOf8K-PZhKoVgo4bKLG-8hoJOVZBYBA@mail.gmail.com> (raw)
In-Reply-To: <834kt2z7n1.fsf@gnu.org>

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

I got distracted with yak shaving other things and circled back around to
this issue. I was reinstalling NixOS on my laptop to try my hand at getting
LUKS encryption working and decided to try to replicate the issue on there.
I was able to, but that's not too surprising since the whole point of NixOS
is reproducible environments.

I decided to try reproduce it in Manjaro on my laptop from a "live CD"
burned to a usb drive. Well that attempt got thwarted by attempting to
install a rust based AUR helper which ate up all my RAM (on my old laptop)
and started swapping to my usb drive. (I was trying to get an AUR helper to
install google fonts)

So I installed virt-manager (et al) (on my main computer) and Manjaro in a
virtual machine. I built Emacs from source using `make` and `make install`
from the latest in the master branch in git://git.savannah.gnu.org/emacs.git.
Then I installed google fonts from
https://aur.archlinux.org/packages/ttf-google-fonts-git/

... and... no issue dammit.

So I got my local machine back to the state where the issues occurred.
`fc-list | rg -i google > fonts.txt` and use the power of Emacs to turn the
~1800 fonts into a list of strings I can set to `face-ignored-fonts`
variable.

I was excited to see that ignoring all 1800+ fonts fixed the perf issue. So
I binary searched through them commenting them out and narrowed it down to
one.. damn font "Adobe Blank".

And sure enough (on my local NixOS machine):

λ ~/ time emacs -Q --eval '(message "︵")' -kill
emacs -Q --eval '(message "︵")' -kill  82.35s user 0.03s system 99% cpu
1:22.56 total

λ ~/ time emacs -Q --eval "(progn (setq face-ignored-fonts '(\"Adobe
Blank\")) (message \"︵\"))" -kill
emacs -Q --eval  -kill  0.22s user 0.02s system 68% cpu 0.349 total


AHHHH!!!!


I open up Manjaro in the virtual machine and:

git clone https://github.com/adobe-fonts/adobe-blank.git
cd adobe-blank
sudo cp AdobeBlank.ttf /usr/share/fonts/
fc-cache
time emacs -Q --eval '(message "︵")' -kill

And it took 4 minutes in the virtual machine!

Turns out that https://aur.archlinux.org/packages/ttf-google-fonts-git/
didn't have Adobe Blank font.

Please try it and see if you can repro!

Also, please note that the character I have been testing with is not the
only one were this issue shows up. I have run into the issue when grep for
things using deadgrep, but I didn't spend the time to narrow down to an
exact character in those cases.


On Wed, Apr 29, 2020 at 9:31 AM Eli Zaretskii <eliz@gnu.org> wrote:

> > From: Will Bush <will.g.bush@gmail.com>
> > Date: Wed, 29 Apr 2020 07:42:20 -0500
> > Cc: Robert Pluim <rpluim@gmail.com>, "Basil L. Contovounesios" <
> contovob@tcd.ie>, 40733@debbugs.gnu.org,
> >       James Cloos <cloos@jhcloos.com>
> >
> > Did you see my other message that I forwarded where I forgot to CC
> everyone? I
> > was able to switch between a bunch of revisions of the master branch to
> see
> > where the performance issue started, and it appears to have started with
> commit
> > (88efc736f5 Default cairo to enabled). I was hoping that would narrow it
> down.
>
> I don't think it does.
>
> And the profile you show doesn't seem to be pointing at Emacs as the
> culprit, since all the functions shown are unrelated to displaying
> characters.  So perhaps Robert is right, and some font-related
> subsystem of your OS is what takes time here.
>

[-- Attachment #2: Type: text/html, Size: 4664 bytes --]

  reply	other threads:[~2020-06-01 11:19 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-20 11:05 bug#40733: 28.0.50; Emacs locks up on paste (yank) of unicode characters Will Bush
2020-04-20 15:52 ` Robert Pluim
2020-04-20 16:13   ` Eli Zaretskii
2020-04-20 21:27     ` Will Bush
2020-04-20 20:20   ` Alan Third
2020-04-20 22:48 ` Basil L. Contovounesios
2020-04-21 10:01   ` Robert Pluim
2020-04-21 12:19     ` Will Bush
2020-04-21 13:19       ` Robert Pluim
2020-04-21 19:35         ` James Cloos
2020-04-22  7:35           ` Robert Pluim
2020-04-25 10:34             ` Will Bush
     [not found]               ` <CA+aYz4RNB1-g5uUz-M-XuJEhZPGpA4X6n8NSiTCUdOMkpReFng@mail.gmail.com>
2020-04-25 13:34                 ` bug#40733: Fwd: " Will Bush
2020-04-25 13:50               ` Eli Zaretskii
2020-04-29 11:59                 ` Will Bush
2020-04-29 12:16                   ` Eli Zaretskii
2020-04-29 12:42                     ` Will Bush
2020-04-29 12:50                       ` Robert Pluim
2020-04-29 14:30                       ` Eli Zaretskii
2020-06-01 11:19                         ` Will Bush [this message]
2020-06-01 11:44                           ` Pip Cet
2020-06-01 15:15                             ` Eli Zaretskii
2020-06-01 15:50                               ` Pip Cet
2022-04-24 14:20                           ` Lars Ingebrigtsen
2022-05-18  3:39                             ` Will Bush
2022-05-18 11:18                               ` Eli Zaretskii
2022-06-15 12:40                               ` Lars Ingebrigtsen
2022-06-19 21:05                                 ` Will Bush
2022-06-19 22:25                                   ` Lars Ingebrigtsen
2020-04-21 14:29       ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+aYz4QssnSS3eMuYYkXOf8K-PZhKoVgo4bKLG-8hoJOVZBYBA@mail.gmail.com \
    --to=will.g.bush@gmail.com \
    --cc=40733@debbugs.gnu.org \
    --cc=cloos@jhcloos.com \
    --cc=contovob@tcd.ie \
    --cc=eliz@gnu.org \
    --cc=rpluim@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).