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#21028: Performance regression in revision af1a69f4d17a482c359d98c00ef86fac835b5fac (Apr 2014). Date: Sat, 18 Jul 2015 14:26:21 +0300 Message-ID: <83egk5671e.fsf@gnu.org> References: <559F9FAF.8090708@live.com> <83egkgb2wo.fsf@gnu.org> <559FF8F6.2060209@live.com> <55A652E4.5000606@yandex.ru> <55AA2942.8070706@live.com> <55AA3580.7040905@live.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT X-Trace: ger.gmane.org 1437218842 14384 80.91.229.3 (18 Jul 2015 11:27:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 18 Jul 2015 11:27:22 +0000 (UTC) Cc: 21028@debbugs.gnu.org, dmantipov@yandex.ru To: =?UTF-8?Q?Cl=C3=A9ment?= Pit--Claudel Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jul 18 13:27:10 2015 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 1ZGQGs-00011O-Ga for geb-bug-gnu-emacs@m.gmane.org; Sat, 18 Jul 2015 13:27:10 +0200 Original-Received: from localhost ([::1]:47946 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZGQGr-0007Mr-I7 for geb-bug-gnu-emacs@m.gmane.org; Sat, 18 Jul 2015 07:27:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36671) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZGQGo-0007Li-2V for bug-gnu-emacs@gnu.org; Sat, 18 Jul 2015 07:27:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZGQGk-000574-SB for bug-gnu-emacs@gnu.org; Sat, 18 Jul 2015 07:27:06 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:51136) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZGQGk-00056t-P6 for bug-gnu-emacs@gnu.org; Sat, 18 Jul 2015 07:27:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZGQGk-00068d-8G for bug-gnu-emacs@gnu.org; Sat, 18 Jul 2015 07:27:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 18 Jul 2015 11:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21028 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21028-submit@debbugs.gnu.org id=B21028.143721878123547 (code B ref 21028); Sat, 18 Jul 2015 11:27:02 +0000 Original-Received: (at 21028) by debbugs.gnu.org; 18 Jul 2015 11:26:21 +0000 Original-Received: from localhost ([127.0.0.1]:52582 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZGQG3-00067i-ST for submit@debbugs.gnu.org; Sat, 18 Jul 2015 07:26:20 -0400 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:50565) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZGQG0-00067T-Eo for 21028@debbugs.gnu.org; Sat, 18 Jul 2015 07:26:17 -0400 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0NRO00B00K3Z5P00@a-mtaout21.012.net.il> for 21028@debbugs.gnu.org; Sat, 18 Jul 2015 14:26:10 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NRO00BOZL3J6D10@a-mtaout21.012.net.il>; Sat, 18 Jul 2015 14:26:10 +0300 (IDT) In-reply-to: <55AA3580.7040905@live.com> 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:105022 Archived-At: > Date: Sat, 18 Jul 2015 04:16:16 -0700 > From: Clément Pit--Claudel > > CC: Eli Zaretskii , 21028@debbugs.gnu.org > > I've spent a bit more time looking into this. The problem is due to the following three lines being conditioned on `!NILP(val)`: (that's around line 2780 of src/font.c) > > Lisp_Object copy = copy_font_spec (scratch_font_spec); > ASET (copy, FONT_TYPE_INDEX, driver_list->driver->type); > XSETCDR (cache, Fcons (Fcons (copy, val), XCDR (cache))); > > Before af1a69f, these lines were always run. In af1a69f, they only run if `val` is non nil, causing the regression: on master, moving them back out of the if statement fixes the problem. Thanks. Do you understand how doing something only sometimes could be slower than doing it always? Given that your profile points to Fontconfig, the only explanation I can come up with is that doing this conditionally means additional work in Fontconfig.