bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#15876: 24.3.50; Highly degraded performance between rev 114715 and 1


From: Eli Zaretskii
Subject: bug#15876: 24.3.50; Highly degraded performance between rev 114715 and 115006
Date: Fri, 13 Dec 2013 20:53:24 +0200

> From: Stefan Monnier <monnier@IRO.UMontreal.CA>
> Cc: Eli Zaretskii <eliz@gnu.org>,
>         Jan Djärv
>  <jan.h.d@swipnet.se>,
>         sva-news@mygooglest.com, 15876@debbugs.gnu.org
> Date: Fri, 13 Dec 2013 11:45:15 -0500
> 
> > aren't typical use cases, holding ~200M which we can't reuse is worth
> > trying to fix, IMHO.
> 
> Actually, we *can* reuse that memory, but only by selecting those
> fonts again.  I agree with Eli: the benefit is very small.

The problem is not with fonts, it is with font-entities stored in a
font cache.  For some reason that I cannot understand, Emacs needs to
consult the font cache when it looks for a font suitable for
displaying a character, even when the character was already displayed,
and the face (including the font) used for its display was already
realized and cached in the frame's face cache.  I don't understand the
font selection machinery enough to see why is that necessary.  But the
upshot of all this is that the face and the font do exist, but the
face-entities for that font are GC'ed, and that triggers the whole
process of discovering the available fonts in the available fontsets
again, each time Emacs displays the character.  So if that discovery
process conses a lot, it is likely to trigger GC, which will discard
the font-entities, etc. etc.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]