Subject: Re: bug#15876: 24.3.50; Highly degraded performance between rev 114715 and 115006

From: Dmitry Antipov <[email-masked]>
Date: Tue, 03 Dec 2013 19:09:10 +0400

Oops.

According to comments at the beginning of font.h, FONT_ENTITY_INDEX slot
of font object should reference font-entity from which this font object
is opened.  But now I'm seeing that this slot is always Qnil.  I.e. the
following patch should help:

=== modified file 'src/font.c'
--- src/font.c	2013-10-29 16:11:50 +0000
+++ src/font.c	2013-12-03 12:10:28 +0000
@@ -196,6 +196,7 @@
        if (! NILP (AREF (entity, FONT_EXTRA_INDEX)))
  	font->props[FONT_EXTRA_INDEX]
  	  = Fcopy_alist (AREF (entity, FONT_EXTRA_INDEX));
+      font->props[FONT_ENTITY_INDEX] = entity;
      }
    if (size > 0)
      font->props[FONT_SIZE_INDEX] = make_number (pixelsize);

With this patch applied, I can hit 'break' at alloc.c:5327 even if
configured with --without-xft; this should help MS-Windows build too.

(Just for fun: font entity recording was introduced in r100788 but
reverted in r100814 due to OTF handling changes.  How dumb.)

Dmitry