From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: =?UTF-8?Q?Cl=C3=A9ment?= Pit-Claudel Newsgroups: gmane.emacs.bugs Subject: bug#41200: Displaying a tooltip with x-show-tip gets very slow as more faces are defined Date: Sat, 16 May 2020 19:43:07 -0400 Message-ID: <3fc34671-54ba-e83d-9514-11e0906c2ac0@gmail.com> References: <8fd8896a-cd5c-66f4-4792-f65cac4dc4f5@gmail.com> <83lflx896q.fsf@gnu.org> <837dxd31cb.fsf@gnu.org> <789d786d-a07a-65c1-c0e4-433e4c18d64e@gmail.com> <835zcxgrby.fsf@gnu.org> <833681glas.fsf@gnu.org> <53252e93-085c-477f-21df-c909082dffc2@gmail.com> <87367z324f.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------3E979902F5EF3AC0752E533E" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="103942"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 Cc: 41200@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 17 01:44:10 2020 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 1ja6TS-000QxA-3h for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 17 May 2020 01:44:10 +0200 Original-Received: from localhost ([::1]:59612 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ja6TQ-0002WB-L5 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 16 May 2020 19:44:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53876) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ja6TK-0002Vr-Cj for bug-gnu-emacs@gnu.org; Sat, 16 May 2020 19:44:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58611) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ja6TK-00052s-3N for bug-gnu-emacs@gnu.org; Sat, 16 May 2020 19:44:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ja6TJ-0001Ve-V5 for bug-gnu-emacs@gnu.org; Sat, 16 May 2020 19:44:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Cl=C3=A9ment?= Pit-Claudel Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 16 May 2020 23:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41200 X-GNU-PR-Package: emacs Original-Received: via spool by 41200-submit@debbugs.gnu.org id=B41200.15896725975740 (code B ref 41200); Sat, 16 May 2020 23:44:01 +0000 Original-Received: (at 41200) by debbugs.gnu.org; 16 May 2020 23:43:17 +0000 Original-Received: from localhost ([127.0.0.1]:41924 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ja6Sa-0001UW-Ui for submit@debbugs.gnu.org; Sat, 16 May 2020 19:43:17 -0400 Original-Received: from mail-qt1-f179.google.com ([209.85.160.179]:46174) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ja6SZ-0001UH-MV for 41200@debbugs.gnu.org; Sat, 16 May 2020 19:43:16 -0400 Original-Received: by mail-qt1-f179.google.com with SMTP id p12so5199745qtn.13 for <41200@debbugs.gnu.org>; Sat, 16 May 2020 16:43:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=spHTQQBqOaeqOPrEyi4PtSaUaOq+GwH1XSEyzmQ9l/A=; b=IorSVA/lQah/0puPVmNLzBnwOPq4/s1CXzDDoYmOP+TZ1FMSSQOfBgVVFqgYrVKS8W Oa7I2ZTEbeH9xNBQ+rs4Iqo3VU/1S5+h424Nvzqqjy4IzBFv2SfxWeXNuUxMRDsLLTs0 fATOby1C73XctFgmN8UAwYLv7Ax39pWZm8+ovc3B1xjKqrCFi0X4oDE8ZlgS/CduKKnc /gOisKYy/G7576LHXr361AJ6akHhOeCUAXq6NTSC8+JCeO9xgSVC876/j/WtHhJiJIDR MvfzsuFdvMVVCeZUfsNMUEdj/ei0SMIyJU5M7pO1gzH2z7XDeLqxjSo8TM7dJkKEsWd6 cYnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=spHTQQBqOaeqOPrEyi4PtSaUaOq+GwH1XSEyzmQ9l/A=; b=LMuti+5j/vYgc9G0Sx4I322xECp1KS4nVpc09RjO4p4Btmjd+PgsqUrRjQRFJQkElz hmk6KUIzY5IRYK7n2wYUd9SDLVazp0GvOzE9ZeEy20x+Zf60I71spDle28lNs9iP4TUs UXsv/qJ2eMGp/1o/Py1H+zy8ODzuZ8uLC+eubg8JLuVCTHqKTYIpLqBLVV4VH6sH3wEq NfaSJQWzPgDv6PWI8yCwvAAJtMl9DBcP1O3oGqhRMGWolhIMojr6KEQC8j63xhUyOSnG YUwpjt2vPA5f4zIOM8Z8e4kxUM0B406Nw/scFn3TVwblCV/GjzYAaD0pDAwLo5MNkzd3 hq+g== X-Gm-Message-State: AOAM530eeVHXyGrRzUzSMLr5VAtJdoKExvx40oNrfx0yV9nuJbOw8WNE /sIhjq8jkNjPawdVUenjELH+ozHf X-Google-Smtp-Source: ABdhPJxoSGi9sGKqPqIYcb5zLCsjt1prCP2vWsWpXM9ZTo3fCbUWeLTCIKFitEfIlV1L4mBgbT3Q1w== X-Received: by 2002:ac8:3292:: with SMTP id z18mr9529370qta.32.1589672589782; Sat, 16 May 2020 16:43:09 -0700 (PDT) Original-Received: from ?IPv6:2601:184:4180:66e7:4d17:b25e:8d9:2188? ([2601:184:4180:66e7:4d17:b25e:8d9:2188]) by smtp.googlemail.com with ESMTPSA id n20sm5420300qtk.89.2020.05.16.16.43.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 16 May 2020 16:43:09 -0700 (PDT) In-Reply-To: <87367z324f.fsf@mail.linkov.net> Content-Language: en-GB 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" Xref: news.gmane.io gmane.emacs.bugs:180416 Archived-At: This is a multi-part message in MIME format. --------------3E979902F5EF3AC0752E533E Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 16/05/2020 19.03, Juri Linkov wrote: >>>>> I think the problem is that tab-line is declared a basic face, but its >>>>> defface form is not in faces.el. >>>> >>>> Ah, good catch. Current there's a defface for tab-bar in lisp/tab-bar, and since that's preloaded it works, but the defface for tab-line is in lisp/tab-line.el and so isn't preloaded. >>>> Should I move both to faces.el? >>>> >>> Yes, I think so. >> >> Thanks. I will ask Juri to confirm before moving them, because I realize now that they have a custom group. >> Juri (CC'd; hi Juri!), was there a reason to make tab-bar and tab-line basic faces? I see they are both in their own files and groups, instead of being in faces.el. > > Actually, no reason other than consistency of faces belonging to the > same file where they are used. But if it will fix the technical problem, > please move them to faces.el, especially given the fact that their > counterpart tool-bar face is already defined in faces.el. Thanks a lot. The attached patch does that. --------------3E979902F5EF3AC0752E533E Content-Type: text/x-patch; charset=UTF-8; name="0001-Move-tab-bar-and-tab-line-to-faces.el-part-of-bug-41.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-Move-tab-bar-and-tab-line-to-faces.el-part-of-bug-41.pa"; filename*1="tch" >From 4d3349d83791a57cdc01374c82792fff6e1b8a94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Pit-Claudel?= Date: Sat, 16 May 2020 19:36:43 -0400 Subject: [PATCH] Move tab-bar and tab-line to faces.el (part of bug#41200) These are basic faces, so they need to be defined in faces.el (otherwise (get 'tab-line 'face) returns 0). * lisp/tab-bar.el (tab-bar): * lisp/tab-line.el (tab-line): Move from here... * lisp/faces.el (menu): ...to here. --- lisp/faces.el | 27 +++++++++++++++++++++++++++ lisp/tab-bar.el | 13 ------------- lisp/tab-line.el | 14 -------------- 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/lisp/faces.el b/lisp/faces.el index bb51797a38..b495fb6e87 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -2755,6 +2755,33 @@ tool-bar :version "21.1" :group 'basic-faces) +(defface tab-line + '((((class color) (min-colors 88)) + :inherit variable-pitch + :height 0.9 + :background "grey85" + :foreground "black") + (((class mono)) + :background "grey") + (t + :inverse-video t)) + "Tab line face." + :version "27.1" + :group 'basic-faces) + +(defface tab-bar + '((((class color) (min-colors 88)) + :inherit variable-pitch + :background "grey85" + :foreground "black") + (((class mono)) + :background "grey") + (t + :inverse-video t)) + "Tab bar face." + :version "27.1" + :group 'basic-faces) + (defface menu '((((type tty)) :inverse-video t) diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el index ce6d8c33dd..689481b28b 100644 --- a/lisp/tab-bar.el +++ b/lisp/tab-bar.el @@ -50,19 +50,6 @@ tab-bar-faces :group 'faces :version "27.1") -(defface tab-bar - '((((class color) (min-colors 88)) - :inherit variable-pitch - :background "grey85" - :foreground "black") - (((class mono)) - :background "grey") - (t - :inverse-video t)) - "Tab bar face." - :version "27.1" - :group 'tab-bar-faces) - (defface tab-bar-tab '((default :inherit tab-bar) diff --git a/lisp/tab-line.el b/lisp/tab-line.el index 7a2bdc0b72..50ec40bacf 100644 --- a/lisp/tab-line.el +++ b/lisp/tab-line.el @@ -41,20 +41,6 @@ tab-line-faces :group 'faces :version "27.1") -(defface tab-line - '((((class color) (min-colors 88)) - :inherit variable-pitch - :height 0.9 - :background "grey85" - :foreground "black") - (((class mono)) - :background "grey") - (t - :inverse-video t)) - "Tab line face." - :version "27.1" - :group 'tab-line-faces) - (defface tab-line-tab '((default :inherit tab-line) -- 2.17.1 --------------3E979902F5EF3AC0752E533E--