variable to nil to disable the new behavior and get back the old
behavior.
+---
+** New variable 'inhibit-compacting-font-caches'.
+Set this variable to a non-nil value to speed up display of characters
+using large fonts, at the price of a larger memory footprint of the
+Emacs session.
+
\f
* Installation Changes in Emacs 25.1
for (t = terminal_list; t; t = t->next_terminal)
{
Lisp_Object cache = TERMINAL_FONT_CACHE (t);
- if (CONSP (cache))
+ /* Inhibit compacting the caches if the user so wishes. Some of
+ the users don't mind a larger memory footprint, but do mind
+ slower redisplay. */
+ if (!inhibit_compacting_font_caches
+ && CONSP (cache))
{
Lisp_Object entry;
EMACS_FONT_LOG is set at startup, it defaults to nil. */);
Vfont_log = Qnil;
+ DEFVAR_BOOL ("inhibit-compacting-font-caches", inhibit_compacting_font_caches,
+ doc: /*
+If non-nil, don't compact font caches during GC.
+Some large fonts cause lots of consing and trigger GC. If they
+are removed from the font caches, they will need to be opened
+again during redisplay, which slows down redisplay. If you
+see font-related delays in displaying some special characters,
+and cannot switch to a smaller font for those characters, set
+this variable non-nil.
+Disabling compaction of font caches might enlarge the Emacs memory
+footprint in sessions that use lots of different fonts. */);
+ inhibit_compacting_font_caches = 0;
+
#ifdef HAVE_WINDOW_SYSTEM
#ifdef HAVE_FREETYPE
syms_of_ftfont ();