Ok I've made some progress on this issue.
I was playing around with my fonts:
https://github.com/willbush/system/blob/085e4c547f0bd84729f12f82b920d867d05e1591/nixos/fonts.nix#L7I was curious how many fonts I would have (using `fc-list | wc -l`) if I removed
them all from that list. After removing them all, I checked my email in Gmail
using Firefox and noticed the `︵` was rendering properly. Then I tried pasting it
into Emacs and lo and behold no lag issue!
So I did a binary search through my font list commenting / uncommenting them and
applying the changes with `sudo nixos rebuild switch` (as one does in NixOS),
and found google-fonts is causing the issue.
I verified it several times. When I remove google-fonts, Firefox renders the
character fine and Emacs yanks it without issue. When I add google-fonts back
Firefox doesn't render the character and Emacs yanking it lags like crazy.
The google-fonts Nix _expression_ is here:
https://github.com/NixOS/nixpkgs/blob/master/pkgs/data/fonts/google-fonts/default.nixI tried Emacs 26.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.17) (A
version that just happens to be in nixpkgs) again to see what it would do when
yanking that character with and without google-fonts installed.
With google-fonts installed it doesn't have latency issues, but it inserts an
empty whitespace looking character (wider than a normal space). Without
google-fonts installed, it renders the character fine with no latency.
So I suspect even if there is an issue with google-fonts, there's still a
regression in Emacs since 26.3. I'll try newer versions of Emacs later to try to
narrow the version gap between 26.3 and 28.0.50.
Perhaps someone can try to reproduce the issue by installing google-fonts (note
the git rev used in default.nix above is
f113126dc4b9b1473d9354a86129c9d7b837aa1a for https://github.com/google/fonts).