unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Will Bush <will.g.bush@gmail.com>
To: James Cloos <cloos@jhcloos.com>,
	"Basil L. Contovounesios" <contovob@tcd.ie>,
	40733@debbugs.gnu.org, Robert Pluim <rpluim@gmail.com>
Subject: bug#40733: Fwd: bug#40733: 28.0.50; Emacs locks up on paste (yank) of unicode characters
Date: Sat, 25 Apr 2020 08:34:05 -0500	[thread overview]
Message-ID: <CA+aYz4SbhOH1DzKOKt6mO970BVqR7AHAev64euxKmjGT24hRaA@mail.gmail.com> (raw)
In-Reply-To: <CA+aYz4RNB1-g5uUz-M-XuJEhZPGpA4X6n8NSiTCUdOMkpReFng@mail.gmail.com>

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

I forgot to CC everyone.

---------- Forwarded message ---------
From: Will Bush <will.g.bush@gmail.com>
Date: Sat, Apr 25, 2020 at 8:30 AM
Subject: Re: bug#40733: 28.0.50; Emacs locks up on paste (yank) of unicode
characters
To: Robert Pluim <rpluim@gmail.com>


Robert> ...we implicitly do '--with-cairo' now.

Will> Is that since 27.0.50?

Think I just answered my own question the hard way.

I was able to narrow the performance issue to starting after rev
`6100f9a19e9d8d8e688ad8bbec2233bd6782cbde` and before or at
`a75047634697acbc37a9ecd58cc5e7ea9d89d91f` in the master branch in Emacs
repository.

Which corresponds to these commits:

06caa3b7e5 | * | Refactor Tramp async process code
88efc736f5 | * | Default cairo to enabled
4fc0bc9678 | * | Update from gnulib
0abda558bc | * | Port configure.ac to future Gnulib
6100f9a19e | * | * src/pdumper.c (dump_vectorlike): Unbreak build after
724af7671590c

Lol "Default cairo to enabled" really stands out there. It's probably safe
to
assume that's what it is.

Following goes into extraneous detail showing how I verified it's between
those
two revisions:

λ ~/system/nixos/ emacs/revamp* niv update emacs-overlay -a
rev=0feda8b31b52f3ea008555dfe79dba3989d3e585
Update emacs-overlay
  Reading sources file
Done: Update emacs-overlay
λ ~/system/nixos/ emacs/revamp* home-manager switch
... home manager spam goes here
λ ~/system/nixos/ emacs/revamp* time emacs -Q --eval '(message "︵")' -kill
emacs -Q --eval '(message "︵")' -kill  0.42s user 0.02s system 64% cpu
0.690 total
λ ~/system/nixos/ emacs/revamp* time emacs -Q --eval '(message "︵")' -kill
emacs -Q --eval '(message "︵")' -kill  0.43s user 0.02s system 94% cpu
0.472 total
λ ~/system/nixos/ emacs/revamp* niv update emacs-overlay -a
rev=a75047634697acbc37a9ecd58cc5e7ea9d89d91f
Update emacs-overlay
  Reading sources file
Done: Update emacs-overlay
λ ~/system/nixos/ emacs/revamp* home-manager switch
... more home manager spam
λ ~/system/nixos/ emacs/revamp* time emacs -Q --eval '(message "︵")' -kill
emacs -Q --eval '(message "︵")' -kill  80.73s user 0.02s system 99% cpu
1:20.97 total
λ ~/system/nixos/ emacs/revamp*

The `niv update emacs-overlay -a
rev=a75047634697acbc37a9ecd58cc5e7ea9d89d91f`
command is using a tool called niv to update emacs-overlay to a pinned
version.
The rev in the diff below is for the Emacs repository.

*# perf issue:*

a75047634697acbc37a9ecd58cc5e7ea9d89d91f
Author:     emacs-overlay <emacs-overlay@nix-community>
AuthorDate: Tue Jan 14 12:10:25 2020 +0000
Commit:     emacs-overlay <emacs-overlay@nix-community>
CommitDate: Tue Jan 14 12:10:25 2020 +0000

Parent:     9351772 Updated repos/melpa
Contained:  master

Updated repos/emacs

modified   repos/emacs/emacs.json
@@ -1 +1 @@
-{"rev": "4fc0bc96787252b1b3e14a7f747ef556273b5979", "sha256":
"0syw4xcbps6i62fa7l88zyvyc3kiggx2kpa2n41p8y2pl01vdqqs", "version":
"20200114.0"}
+{"rev": "06caa3b7e5e9fe91b6918f8567adbd5501d6dbdd", "sha256":
"0kzk30660xky0zj7v5sr9a49pnnz609jda4s8x86pjk91x1wrv2i", "version":
"20200114.0"}

*# no perf issue:*

0feda8b31b52f3ea008555dfe79dba3989d3e585
Author:     emacs-overlay <emacs-overlay@nix-community>
AuthorDate: Mon Jan 13 00:10:30 2020 +0000
Commit:     emacs-overlay <emacs-overlay@nix-community>
CommitDate: Mon Jan 13 00:10:30 2020 +0000

Parent:     e38dc3b Updated repos/melpa
Contained:  master

Updated repos/emacs

modified   repos/emacs/emacs.json
@@ -1 +1 @@
-{"rev": "41d9d51cf5ac5b76c09802388e1691cf489d9d9d", "sha256":
"1vy1fcw2m7lbw8wcwmp04zwkqra835vdbxbgnms3wgrwviqm14zd", "version":
"20200111.0"}
+{"rev": "6100f9a19e9d8d8e688ad8bbec2233bd6782cbde", "sha256":
"01fvxplljwnz11sizlfpl219dvrg7yf790zmr69wvkn6wlgxif76", "version":
"20200112.0"}


On Sat, Apr 25, 2020 at 5:34 AM Will Bush <will.g.bush@gmail.com> wrote:

> Robert> Which font specifically does emacs end up using for that character?
> Robert> Emacs ends up using 'Noto Sans CJK KR' for me here.
>
> When google fonts is removed?
>
> This is what `C-u C-x =` says:
>
> ftcrhb:-PfEd-Unifont-normal-normal-normal-*-15-*-*-*-d-0-iso10646-1
> (#xDD38ftcrhb:-PfEd-Unifont-normal-normal-normal-*-15-*-*-*-d-0-iso10646-1
> (#xDD38)
>
> Note on the above: For the hell of it, I tried installing `noto-fonts`
> font pack
> from nixpkgs and it didn't make a difference. Then again, `fc-list
> --verbose |
> rg "Noto Sans CJK" -i` produced no results so that specific font probably
> isn't
> in that font pack.
>
> When google fonts are installed:
>
> ftcrhb:-GNU-Unifont-normal-normal-normal-Sans-Serif-16-*-*-*-c-80-iso10646-1
> (#xDD36)
>
> Robert> BTW, if you want to ignore that font, you can set
> Robert> 'face-ignored-fonts' to match it, and you won't have to uninstall
> it.
>
> Thanks, I didn't know that! Maybe I can use that to narrow down to the
> specific
> font that's causing problems because adding `google-fonts` adds 2905 fonts
> for
> me, and many I would like to have.
>
> Robert> I donʼt think thereʼs much point in that: emacs-26 uses Xft for
> font
> Robert> handling, emacs-27 uses Cairo+Harfbuzz[1]; theyʼre fundamentally
> doing
> Robert> very different things, so I donʼt think this is caused by a single
> Robert> identifiable change.
>
> I'm not trying to prove you wrong or anything. It's just easy for me to try
> different versions because I'm using
> (https://github.com/nix-community/emacs-overlay). However, I tried Emacs
> 27.0.50
> and it's behaving exactly the same as Emacs 26. I glanced at the
> `report-emacs-bug` output and the build inputs look the same. I can
> include it
> if desired.
>
> λ ~/ time emacs -Q --eval '(message "hi")' -kill
> emacs -Q --eval '(message "hi")' -kill  0.18s user 0.02s system 67% cpu
> 0.303 total
> λ ~/ time emacs -Q --eval '(message "︵")' -kill
> emacs -Q --eval '(message "︵")' -kill  0.44s user 0.03s system 95% cpu
> 0.494 total
> λ ~/ emacs --version
> GNU Emacs 27.0.50
>
> Robert> ...we implicitly do '--with-cairo' now.
>
> Is that since 27.0.50?
>
> Were either Cairo+Harfbuzz libraries updated since 27.0.50 (perhaps a
> regression
> in those libraries)? I'll follow up with an update later after testing
> more versions.
>
> Robert> Although you can still build it with Xft if you want, but I
> Robert> wouldnʼt recommend that, since it will crash once you start
> Robert> processing Emojis and other 'interesting' Unicode characters.
>
> Just to verity I understand. Building with Xft is what `--with-xft` is
> doing in
> the following from my initial email?
>
> Configured using:
>  'configure
>  --prefix=/nix/store/5v0fp6vikajaqc2v0ppkm51hfc054mnm-emacs-git-20190910.0
>  --disable-build-details --with-modules --with-x-toolkit=gtk3 --with-xft
>  CFLAGS=-DMAC_OS_X_VERSION_MAX_ALLOWED=101200'
>
> Eli> I'm not sure I understand: you are saying that slow, but correct
> Eli> display is _worse_ than displaying a white space instead of the
> Eli> correct glyph, i.e. producing incorrect display?  To me, it sounds
> Eli> like Emacs 27+ actually _improves_ things in this case.
>
> Let me quantify the performance because I've been ambiguous about it so
> far:
>
> λ ~/ time emacs -Q --eval '(message "hi")' -kill
> emacs -Q --eval '(message "hi")' -kill  0.19s user 0.02s system 55% cpu
> 0.371 total
> λ ~/ time emacs -Q --eval '(message "︵")' -kill
> emacs -Q --eval '(message "︵")' -kill  81.64s user 0.03s system 99% cpu
> 1:21.91 total
>
> It takes ~81 seconds to do something while locking up the UI. That's
> personally
> beyond my threshold for killing the process.
>
>
> On Wed, Apr 22, 2020 at 2:35 AM Robert Pluim <rpluim@gmail.com> wrote:
>
>> >>>>> On Tue, 21 Apr 2020 15:35:23 -0400, James Cloos <cloos@jhcloos.com>
>> said:
>>
>> >>>>> "RP" == Robert Pluim <rpluim@gmail.com> writes:
>>     RP> Footnotes:
>>     RP> [1]  Although you can still build it with Xft if you want, but I
>>     RP> wouldnʼt recommend that, since it will crash once you start
>>     RP> processing Emojis and other 'interesting' Unicode characters.
>>
>>     James> note that master will also crash when using cr+hb on some code
>> points.
>>
>>     James> such as some private use characters.
>>
>> Examples? Eli fixed one such case with Bug#39892, but if there are
>> more we should fix them (please open a separate bug report for that).
>>
>> Robert
>>
>

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

  parent reply	other threads:[~2020-04-25 13:34 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                 ` Will Bush [this message]
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
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+aYz4SbhOH1DzKOKt6mO970BVqR7AHAev64euxKmjGT24hRaA@mail.gmail.com \
    --to=will.g.bush@gmail.com \
    --cc=40733@debbugs.gnu.org \
    --cc=cloos@jhcloos.com \
    --cc=contovob@tcd.ie \
    --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).