From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#15876: 24.3.50; Highly degraded performance between rev 114715 and 115006 Date: Fri, 13 Dec 2013 20:53:24 +0200 Message-ID: <83txec4m6z.fsf@gnu.org> References: <867gcdiqji.fsf@somewhere.org> <86r4a2vqbu.fsf@somewhere.org> <867gbqdisp.fsf@somewhere.org> <83haas5y88.fsf@gnu.org> <529C64C5.2040509@yandex.ru> <834n6r5edh.fsf@gnu.org> <529DAAED.9000504@yandex.ru> <83ob4y3wi5.fsf@gnu.org> <529DF416.7070807@yandex.ru> <83txeo33ls.fsf@gnu.org> <52A01D59.7030304@yandex.ru> <83lhzz2oal.fsf@gnu.org> <52A80BA8.3050403@yandex.ru> <83ob4nwdw0.fsf@gnu.org> <52A8A850.8040302@yandex.ru> <83k3fb6yvb.fsf@gnu.org> <837gb86aiq.fsf@gnu.org> <52AB320B.9020203@yandex.ru> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT X-Trace: ger.gmane.org 1386960851 9228 80.91.229.3 (13 Dec 2013 18:54:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 13 Dec 2013 18:54:11 +0000 (UTC) Cc: sva-news@mygooglest.com, 15876@debbugs.gnu.org, dmantipov@yandex.ru To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 13 19:54:14 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VrXsM-00074m-Jo for geb-bug-gnu-emacs@m.gmane.org; Fri, 13 Dec 2013 19:54:14 +0100 Original-Received: from localhost ([::1]:44287 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VrXsM-0006ef-AM for geb-bug-gnu-emacs@m.gmane.org; Fri, 13 Dec 2013 13:54:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45864) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VrXsF-0006Y5-JE for bug-gnu-emacs@gnu.org; Fri, 13 Dec 2013 13:54:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VrXsA-0006Ih-9m for bug-gnu-emacs@gnu.org; Fri, 13 Dec 2013 13:54:07 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34812) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VrXsA-0006Ib-16 for bug-gnu-emacs@gnu.org; Fri, 13 Dec 2013 13:54:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VrXs9-0004iU-LQ for bug-gnu-emacs@gnu.org; Fri, 13 Dec 2013 13:54:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 13 Dec 2013 18:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15876 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 15876-submit@debbugs.gnu.org id=B15876.138696081218079 (code B ref 15876); Fri, 13 Dec 2013 18:54:01 +0000 Original-Received: (at 15876) by debbugs.gnu.org; 13 Dec 2013 18:53:32 +0000 Original-Received: from localhost ([127.0.0.1]:48830 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VrXrf-0004hW-Gl for submit@debbugs.gnu.org; Fri, 13 Dec 2013 13:53:32 -0500 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:62056) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VrXrZ-0004hJ-JC for 15876@debbugs.gnu.org; Fri, 13 Dec 2013 13:53:27 -0500 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MXR00G00DQJHC00@a-mtaout22.012.net.il> for 15876@debbugs.gnu.org; Fri, 13 Dec 2013 20:53:24 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MXR00GMBDSZ9V90@a-mtaout22.012.net.il>; Fri, 13 Dec 2013 20:53:24 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:81903 Archived-At: > From: Stefan Monnier > Cc: Eli Zaretskii , > Jan Djärv > , > 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.