GNU bug report logs - #79375
Character rendering slowly

Previous Next

Package: emacs;

Reported by: Psionic K <psionik <at> positron.solutions>

Date: Wed, 3 Sep 2025 08:06:01 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Psionic K <psionik <at> positron.solutions>
Cc: 79375 <at> debbugs.gnu.org
Subject: bug#79375: Character rendering slowly
Date: Wed, 03 Sep 2025 15:46:05 +0300
> Date: Wed, 3 Sep 2025 17:04:41 +0900
> From:  Psionic K via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> Emacs is about one week old igc branch.
> 
> The humble character below was grinding my Emacs to a halt whenever
> the point is in a buffer where it's visible.  I chased it into
> libfontconfig with perf.
> 
> ▄▄▄▄▄
> 
> After reproducing in a bare Emacs, I figured it was worth a shot.  If
> it slows down Emasc movement in the buffer while reading this message,
> you have reproduced the issue already.

Doesn't happen here, but my Emacs doesn't use Fontconfig, so maybe it
isn't a surprise.

> Perf data pointing at libfontconfig being bothered by this character.
> 
>   29.05%  emacs  libfontconfig.so.1.15.0                         [.]
> __popcountdi2
>   15.17%  emacs  libfontconfig.so.1.15.0                         [.]
> FcCharSetSubtractCount
>    8.18%  emacs  libfontconfig.so.1.15.0                         [.]
> FcCharSetFindLeafForward
>    5.96%  emacs  libfontconfig.so.1.15.0                         [.]
> FcCompare
>    5.86%  emacs  libfontconfig.so.1.15.0                         [.]
> FcCompareValueList
>    4.90%  emacs  libfontconfig.so.1.15.0                         [.]
> FcStrCmpIgnoreCase
>    4.89%  emacs  libfontconfig.so.1.15.0                         [.]
> FcCharSetIterSet
>    4.73%  emacs  libfontconfig.so.1.15.0                         [.]
> FcStrHashIgnoreBlanksAndCase
>    2.04%  emacs  libfontconfig.so.1.15.0                         [.]
> FcStrGlobMatch
>    1.61%  emacs  libfontconfig.so.1.15.0                         [.]
> FcCompareNumber
>    1.06%  emacs  libfontconfig.so.1.15.0                         [.]
> FcValueCanonicalize
>    0.98%  emacs  libfontconfig.so.1.15.0                         [.]
> FcStrCmp
>    0.94%  emacs  libfontconfig.so.1.15.0                         [.]
> FcCompareBool
>    0.88%  emacs  libfontconfig.so.1.15.0                         [.]
> FcHashTableFind
>    0.79%  emacs  libfontconfig.so.1.15.0                         [.]
> FcCompareRange

AFAICT, Emacs doesn't call directly any of these Fc* Fontconfig
functions that seem to be hot spots.  So it is hard to figure out how
do we end up calling them.  Would it be possible to show the call-tree
that leads to __popcountdi2 or FcCharSetSubtractCount, so that the
Emacs functions which lead to those could be identified?

Btw, I presume that Emacs on your system is capable of displaying this
character, i.e. that you have some font capable of displaying it, is
that right?

Btw2, do you see the slowdown in "emacs -Q" when this character is in
the buffer?

Thanks.




This bug report was last modified 10 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.