From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Aaron Jensen Newsgroups: gmane.emacs.bugs Subject: bug#59208: 29.0.50; tab-bar-auto-width plus display space cpu spin Date: Sat, 12 Nov 2022 11:39:23 -0800 Message-ID: References: <86tu34ko8s.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000e2d6e505ed4b2963" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17975"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 59208@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 12 20:40:44 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 1otwMt-0004U0-QT for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 12 Nov 2022 20:40:43 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1otwMf-0000yh-S9; Sat, 12 Nov 2022 14:40:29 -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 1otwMW-0000xi-Cp for bug-gnu-emacs@gnu.org; Sat, 12 Nov 2022 14:40:21 -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 1otwME-0007aK-S9 for bug-gnu-emacs@gnu.org; Sat, 12 Nov 2022 14:40:12 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1otwME-0007Nt-EU for bug-gnu-emacs@gnu.org; Sat, 12 Nov 2022 14:40:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Aaron Jensen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 12 Nov 2022 19:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59208 X-GNU-PR-Package: emacs Original-Received: via spool by 59208-submit@debbugs.gnu.org id=B59208.166828197228346 (code B ref 59208); Sat, 12 Nov 2022 19:40:02 +0000 Original-Received: (at 59208) by debbugs.gnu.org; 12 Nov 2022 19:39:32 +0000 Original-Received: from localhost ([127.0.0.1]:49052 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otwLk-0007N8-7Z for submit@debbugs.gnu.org; Sat, 12 Nov 2022 14:39:32 -0500 Original-Received: from mail-pl1-f182.google.com ([209.85.214.182]:34785) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otwLi-0007Ms-Od for 59208@debbugs.gnu.org; Sat, 12 Nov 2022 14:39:31 -0500 Original-Received: by mail-pl1-f182.google.com with SMTP id v17so6859582plo.1 for <59208@debbugs.gnu.org>; Sat, 12 Nov 2022 11:39:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:references:from:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=0EU7MfWmDIniCKYtO7S1BH60xCAOLRrpX6az5zljplo=; b=UUPf0qBhG41HBc6izAQxR99PAKnR311puiTz2P6qIDUw7lwi9JjflAuaBeDXplVvfS KtKqsjfOrp97OKzB17XEF5Y97DIElzZ74FuNo+Lw1ZcwWRCUqbxiVzoDhCieZkyPJ2YA /1uoLNPvO/2JE+GkoI1wmuUxeC9lrXhLzIYV+yMEY4uUXdmmoYdqgNhhm4vfHohjF5r2 S1I/JJ+dpI1DjEFJzDkTcDM7PAOS46bcYQ0vXPoiGofKfOoFg/uIzEBXN654JgzAzfNj HD55GtQd506dJluNBOKDlAGF39h1kjF45CsRIsqZx2QrXJcXFyDp+8GciHnLeyAHXFOi +axw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:references:from:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=0EU7MfWmDIniCKYtO7S1BH60xCAOLRrpX6az5zljplo=; b=5moz7pZZnHuwehQlGnGpBMmIKxzuh9gmYZS0q8Noy46UAaSWgBZqmvBnElJ+C/xgOK /ImaGMsrhTKh4c5VDlC4nBJ/RiJx0CsDTYczHA4//MLLpv03vgYbqbx8jFAV9AAoC0lg Sx9ZI3Xp5ehuIUHGR0gkUcIN0lF3VA9y0/+e/hk3Zz3ohs/rDRW9Sp+2E0lH0JvS+TkW qJil5nD+KG7mSr68Oig4UPbmIdpJwlkad/TUfv+lKwp3C6Gq3T0FFXNovkNtofLfNAYp CEqsZTTZ0IaGPfyQcEt9KcdY8oi+2i7TKi91vX39lVWUDq6/KakameIhWMW5cO9LpL0h M3xQ== X-Gm-Message-State: ANoB5plk+CPxvzG7uc+8VxLMu/c3LdXKXVEO5uZkSjdUebY9vpwU9B47 Gi1D9FMYQyM03t/PKy8/Go8eLWjuYFoIY6obRLoD4zlG X-Google-Smtp-Source: AA0mqf7dHY+fKDeamuoWV4JrcF+mGAfooNlllbNy8xWdYBO1YJFmioXeKE5XUy99aueidQF3NG0V5yZKNjtvdAVLT3M= X-Received: by 2002:a17:902:ef87:b0:188:6429:d7bd with SMTP id iz7-20020a170902ef8700b001886429d7bdmr7658342plb.30.1668281964613; Sat, 12 Nov 2022 11:39:24 -0800 (PST) Original-Received: from 649336022844 named unknown by gmailapi.google.com with HTTPREST; Sat, 12 Nov 2022 11:39:23 -0800 In-Reply-To: <86tu34ko8s.fsf@mail.linkov.net> X-Mailer: Superhuman iOS 10161 X-Superhuman-ID: laebztvl.89fd9426-dcc0-4ef6-a0f7-9723b2188dba X-Superhuman-Draft-ID: draft00d7a49e34a6fb44 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:247686 Archived-At: --000000000000e2d6e505ed4b2963 Content-Type: text/plain; charset="UTF-8" Apologies for top posting, on my phone. I should note that my actual tab function has text as well (the tab name) and then I add a space at the end. The spaces are just visual padding. Aaron On Sat, Nov 12 2022 at 1:33 PM, Juri Linkov wrote: > My tab-bar-tab-name-format-function causes 100% cpu spin as of ca3763af5c. > Disabling tab-bar-auto-width fixes it. > > > > > To repro: emacs -Q -l repro.el > > > > > repro.el: > > > > > (defun aj/tab-bar-tab-name-format (tab i) > (propertize > (propertize " " 'display '(space :width (8))) > 'face (funcall tab-bar-tab-face-function tab))) > > > > > (setq tab-bar-tab-name-format-function #'aj/tab-bar-tab-name-format) > > > > > (tab-bar-mode) > > Thanks for the bug report. Since with > (propertize " " 'display '(space :width (8))) the tab width can't grow > more than 8 pixels, > a possible fix would be on every iteration > that adds more spaces to the tab name > to check if the tab width remains the same. > --000000000000e2d6e505ed4b2963 Content-Type: text/html; charset="UTF-8"
Apologies for top posting, on my phone. I should note that my actual tab function has text as well (the tab name) and then I add a space at the end. The spaces are just visual padding.


Aaron

On Sat, Nov 12 2022 at 1:33 PM, Juri Linkov <juri@linkov.net> wrote:

My tab-bar-tab-name-format-function causes 100% cpu spin as of ca3763af5c. Disabling tab-bar-auto-width fixes it.

>

To repro: emacs -Q -l repro.el

>

repro.el:

>

(defun aj/tab-bar-tab-name-format (tab i)
(propertize
(propertize " " 'display '(space :width (8)))
'face (funcall tab-bar-tab-face-function tab)))

>

(setq tab-bar-tab-name-format-function #'aj/tab-bar-tab-name-format)

>

(tab-bar-mode)

Thanks for the bug report. Since with
(propertize " " 'display '(space :width (8))) the tab width can't grow more than 8 pixels,
a possible fix would be on every iteration
that adds more spaces to the tab name
to check if the tab width remains the same.

--000000000000e2d6e505ed4b2963--