From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregory Heytings Newsgroups: gmane.emacs.bugs Subject: bug#59347: 29.0.50; `:family` face setting ignored Date: Mon, 12 Dec 2022 08:54:16 +0000 Message-ID: References: <83r0xv1649.fsf@gnu.org> <0d1ea3007f532a493429@heytings.org> <83cz9f12bh.fsf@gnu.org> <835yewleyn.fsf@gnu.org> <83tu2b9rlx.fsf@gnu.org> <83k0347gtu.fsf@gnu.org> <83v8mm2ug7.fsf@gnu.org> <83cz8u2d6u.fsf@gnu.org> <831qp93nsc.fsf@gnu.org> <1a7e3acf3578520feda7@heytings.org> <87ilihjsrb.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10641"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , monnier@iro.umontreal.ca, 59347@debbugs.gnu.org To: Po Lu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 12 09:55:18 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p4eak-0002YD-BT for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 12 Dec 2022 09:55:18 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p4eaV-0002Q6-CJ; Mon, 12 Dec 2022 03:55:03 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p4eaU-0002Pt-MK for bug-gnu-emacs@gnu.org; Mon, 12 Dec 2022 03:55:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p4eaU-0003wT-C2 for bug-gnu-emacs@gnu.org; Mon, 12 Dec 2022 03:55:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p4eaU-00053n-8I for bug-gnu-emacs@gnu.org; Mon, 12 Dec 2022 03:55:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Gregory Heytings Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 12 Dec 2022 08:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59347 X-GNU-PR-Package: emacs Original-Received: via spool by 59347-submit@debbugs.gnu.org id=B59347.167083526019419 (code B ref 59347); Mon, 12 Dec 2022 08:55:02 +0000 Original-Received: (at 59347) by debbugs.gnu.org; 12 Dec 2022 08:54:20 +0000 Original-Received: from localhost ([127.0.0.1]:51582 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p4eZo-000539-B4 for submit@debbugs.gnu.org; Mon, 12 Dec 2022 03:54:20 -0500 Original-Received: from heytings.org ([95.142.160.155]:54430) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p4eZm-000533-Bb for 59347@debbugs.gnu.org; Mon, 12 Dec 2022 03:54:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1670835257; bh=gJt6g9ismpCD4dM4v6E4taYLd9caUb4Di7DoXdIfiFs=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=WJEBJr0wAZZ23eOVpCko9iPC0PucCq+uWc25GqUw/a2mNCtq8yu3MOh5PSBc5h7pg bYgsRoM2FaQ7+7m8RJjtY8UUpLhFPmpD4lt/3sa4zcnSBurAxgKLPXMxAi1R9CXyMT UdEdzzHVASXpbWzdwkeOTgWHzUi7ndufS+j7TBC1h6sxqFsLz020AlPQuhMzqXLIiR entTNK51Yb5dMGmjv4xL9NnZ4Ah02pRGILs9Yr59l4lO0Pc5XLECPWaJxd5Pa1ygl3 454j75VK3FXVCM9HeiJRJ+/byGtp0lrTcHi24j9GJj9rtL5Uum0VZjs43ZN1zNhcRx OnJzrKMDvhJLQ== In-Reply-To: <87ilihjsrb.fsf@yahoo.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:250689 Archived-At: >> It is on purpose that that variable was a bitmask and not a list, it is >> on purpose that that variable was used in a macro and not in a >> function: there is no reason that each face realization in each Emacs >> instance should spend unnecessary CPU cycles (a function call and >> traversing a list) on a variable that should never (or hardly ever) be >> changed, and that was introduced only to help debugging other potential >> problems in that subtle area of Emacs' code. > > And what was the problem with a list? How many cycles is traversing a > list? How many time will it take for your CPU to perform everything? > My measurements indicate that the "improved" code is ~20 slower in an optimized build, and I care about performance. That's a lot to handle a variable that is, in fact, a near-constant. Once again, that variable isn't supposed to be changed by users. It is there for one purpose: if a user reports a bug about font selection, it will be possible to ask them to set that variable to this-and-that value (most probably 0 and most-positive-fixnum) to check whether Emacs behaves better. Of course, brave souls can also try to change it, if they want. > > So, please, demonstrate that searching for a symbol through a list with > 3 elements leads to a performance problem. > It is not "searching for a symbol through a list with three elements", it is 12 function calls, each of which traverses a list of three elements. >> and an exact match could not be found for the font attributes specified >> in the face being realized. > > What is inaccurate about that statement? > The post to which you are replying explains in every possible detail why that statement is wrong. That you don't have the patience to read a 300 posts long bug thread is one thing, that you don't have the patience to read a 100 lines long explanation, and bluntly declare that it is "nonsense", is another. > > Unlike your doc string, it does not need the caller to know about the > inner workings of the face code (how many of our users even know about > the function realize_gui_face?) > And the purpose of that variable is precisely that: making it possible to dynamically control an implementation detail. It is _not_ supposed to be set by users who do not know about the inner workings of the face code.