* bug#59208: 29.0.50; tab-bar-auto-width plus display space cpu spin
@ 2022-11-12 7:31 Aaron Jensen
2022-11-12 18:33 ` Juri Linkov
0 siblings, 1 reply; 9+ messages in thread
From: Aaron Jensen @ 2022-11-12 7:31 UTC (permalink / raw)
To: 59208
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)
In GNU Emacs 29.0.50 (build 1, aarch64-apple-darwin21.6.0, NS
appkit-2113.60 Version 12.6 (Build 21G115)) of 2022-09-28 built on
aaron-m1.local
Windowing system distributor 'Apple', version 10.3.2113
System Description: macOS 12.6.1
Configured using:
'configure --disable-dependency-tracking --disable-silent-rules
--enable-locallisppath=/opt/homebrew/share/emacs/site-lisp
--infodir=/opt/homebrew/Cellar/emacs-plus@29/29.0.50/share/info/emacs
--prefix=/opt/homebrew/Cellar/emacs-plus@29/29.0.50 --with-xml2
--with-gnutls --with-native-compilation --without-compress-install
--without-dbus --without-imagemagick --with-modules --with-rsvg
--with-ns --disable-ns-self-contained 'CFLAGS=-Os -w -pipe
-mmacosx-version-min=12
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk
-DFD_SETSIZE=10000 -DDARWIN_UNLIMITED_SELECT'
'CPPFLAGS=-I/opt/homebrew/opt/zlib/include
-I/opt/homebrew/opt/jpeg/include -I/opt/homebrew/opt/icu4c/include
-I/opt/homebrew/opt/openssl@1.1/include
-I/opt/homebrew/opt/readline/include -isystem/opt/homebrew/include
-F/opt/homebrew/Frameworks
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk'
'LDFLAGS=-L/opt/homebrew/opt/zlib/lib -L/opt/homebrew/opt/jpeg/lib
-L/opt/homebrew/opt/icu4c/lib -L/opt/homebrew/opt/openssl@1.1/lib
-L/opt/homebrew/opt/readline/lib -L/opt/homebrew/lib
-F/opt/homebrew/Frameworks -Wl,-headerpad_max_install_names
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk''
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#59208: 29.0.50; tab-bar-auto-width plus display space cpu spin
2022-11-12 7:31 bug#59208: 29.0.50; tab-bar-auto-width plus display space cpu spin Aaron Jensen
@ 2022-11-12 18:33 ` Juri Linkov
2022-11-12 19:39 ` Aaron Jensen
0 siblings, 1 reply; 9+ messages in thread
From: Juri Linkov @ 2022-11-12 18:33 UTC (permalink / raw)
To: Aaron Jensen; +Cc: 59208
> 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.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#59208: 29.0.50; tab-bar-auto-width plus display space cpu spin
2022-11-12 18:33 ` Juri Linkov
@ 2022-11-12 19:39 ` Aaron Jensen
2022-11-13 18:17 ` Juri Linkov
0 siblings, 1 reply; 9+ messages in thread
From: Aaron Jensen @ 2022-11-12 19:39 UTC (permalink / raw)
To: Juri Linkov; +Cc: 59208
[-- Attachment #1: Type: text/plain, Size: 982 bytes --]
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.
>
[-- Attachment #2: Type: text/html, Size: 1807 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#59208: 29.0.50; tab-bar-auto-width plus display space cpu spin
2022-11-12 19:39 ` Aaron Jensen
@ 2022-11-13 18:17 ` Juri Linkov
2022-11-13 19:17 ` Aaron Jensen
0 siblings, 1 reply; 9+ messages in thread
From: Juri Linkov @ 2022-11-13 18:17 UTC (permalink / raw)
To: Aaron Jensen; +Cc: 59208
close 59208 29.0.50
thanks
> 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.
I didn't try with text, I tried only with spaces as in your test case:
> (defun aj/tab-bar-tab-name-format (tab i)
> (propertize
> (propertize " " 'display '(space :width (8)))
> 'face (funcall tab-bar-tab-face-function tab)))
But I believe that all cases should be fixed now
by the commit 443bd35e86.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#59208: 29.0.50; tab-bar-auto-width plus display space cpu spin
2022-11-13 18:17 ` Juri Linkov
@ 2022-11-13 19:17 ` Aaron Jensen
2022-11-14 7:50 ` Juri Linkov
0 siblings, 1 reply; 9+ messages in thread
From: Aaron Jensen @ 2022-11-13 19:17 UTC (permalink / raw)
To: Juri Linkov; +Cc: 59208
On Sun, Nov 13, 2022 at 1:18 PM Juri Linkov <juri@linkov.net> wrote:
>
> close 59208 29.0.50
> thanks
>
> > 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.
>
> I didn't try with text, I tried only with spaces as in your test case:
>
> > (defun aj/tab-bar-tab-name-format (tab i)
> > (propertize
> > (propertize " " 'display '(space :width (8)))
> > 'face (funcall tab-bar-tab-face-function tab)))
>
> But I believe that all cases should be fixed now
> by the commit 443bd35e86.
Thanks, confirmed.
As an aside, auto-width doesn't work very well when using a
variable-pitch font for your tab bar. Specifically, for me it doesn't
take up the full width when I have enough tabs that would fill that
width.
Aaron
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#59208: 29.0.50; tab-bar-auto-width plus display space cpu spin
2022-11-13 19:17 ` Aaron Jensen
@ 2022-11-14 7:50 ` Juri Linkov
2022-11-14 14:50 ` Aaron Jensen
0 siblings, 1 reply; 9+ messages in thread
From: Juri Linkov @ 2022-11-14 7:50 UTC (permalink / raw)
To: Aaron Jensen; +Cc: 59208
>> But I believe that all cases should be fixed now
>> by the commit 443bd35e86.
>
> Thanks, confirmed.
>
> As an aside, auto-width doesn't work very well when using a
> variable-pitch font for your tab bar. Specifically, for me it doesn't
> take up the full width when I have enough tabs that would fill that
> width.
Sorry, I don't understand the problem. It doesn't take up the full width
of the tab bar? Does it fill the whole tab bar when you customize
tab-bar-auto-width-max to nil?
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#59208: 29.0.50; tab-bar-auto-width plus display space cpu spin
2022-11-14 7:50 ` Juri Linkov
@ 2022-11-14 14:50 ` Aaron Jensen
2022-11-14 17:28 ` Juri Linkov
0 siblings, 1 reply; 9+ messages in thread
From: Aaron Jensen @ 2022-11-14 14:50 UTC (permalink / raw)
To: Juri Linkov; +Cc: 59208
On Mon, Nov 14, 2022 at 2:54 AM Juri Linkov <juri@linkov.net> wrote:
>
> >> But I believe that all cases should be fixed now
> >> by the commit 443bd35e86.
> >
> > Thanks, confirmed.
> >
> > As an aside, auto-width doesn't work very well when using a
> > variable-pitch font for your tab bar. Specifically, for me it doesn't
> > take up the full width when I have enough tabs that would fill that
> > width.
>
> Sorry, I don't understand the problem. It doesn't take up the full width
> of the tab bar? Does it fill the whole tab bar when you customize
> tab-bar-auto-width-max to nil?
No, it does not. It's not computing the overall width of the window
correctly or something like that: https://share.cleanshot.com/otuZj4
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#59208: 29.0.50; tab-bar-auto-width plus display space cpu spin
2022-11-14 14:50 ` Aaron Jensen
@ 2022-11-14 17:28 ` Juri Linkov
2022-11-14 18:11 ` Aaron Jensen
0 siblings, 1 reply; 9+ messages in thread
From: Juri Linkov @ 2022-11-14 17:28 UTC (permalink / raw)
To: Aaron Jensen; +Cc: 59208
>> > As an aside, auto-width doesn't work very well when using a
>> > variable-pitch font for your tab bar. Specifically, for me it doesn't
>> > take up the full width when I have enough tabs that would fill that
>> > width.
>>
>> Sorry, I don't understand the problem. It doesn't take up the full width
>> of the tab bar? Does it fill the whole tab bar when you customize
>> tab-bar-auto-width-max to nil?
>
> No, it does not. It's not computing the overall width of the window
> correctly or something like that: https://share.cleanshot.com/otuZj4
Could you show the minimal tab function that reproduces the problem.
Is it more like this?
(defun aj/tab-bar-tab-name-format (tab i)
(propertize
(concat (alist-get 'name tab)
(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)
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#59208: 29.0.50; tab-bar-auto-width plus display space cpu spin
2022-11-14 17:28 ` Juri Linkov
@ 2022-11-14 18:11 ` Aaron Jensen
0 siblings, 0 replies; 9+ messages in thread
From: Aaron Jensen @ 2022-11-14 18:11 UTC (permalink / raw)
To: Juri Linkov; +Cc: 59208
On Mon, Nov 14, 2022 at 12:38 PM Juri Linkov <juri@linkov.net> wrote:
>
> >> > As an aside, auto-width doesn't work very well when using a
> >> > variable-pitch font for your tab bar. Specifically, for me it doesn't
> >> > take up the full width when I have enough tabs that would fill that
> >> > width.
> >>
> >> Sorry, I don't understand the problem. It doesn't take up the full width
> >> of the tab bar? Does it fill the whole tab bar when you customize
> >> tab-bar-auto-width-max to nil?
> >
> > No, it does not. It's not computing the overall width of the window
> > correctly or something like that: https://share.cleanshot.com/otuZj4
>
> Could you show the minimal tab function that reproduces the problem.
> Is it more like this?
>
> (defun aj/tab-bar-tab-name-format (tab i)
> (propertize
> (concat (alist-get 'name tab)
> (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)
It happens with the default. The issue is the variable pitch font.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2022-11-14 18:11 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-12 7:31 bug#59208: 29.0.50; tab-bar-auto-width plus display space cpu spin Aaron Jensen
2022-11-12 18:33 ` Juri Linkov
2022-11-12 19:39 ` Aaron Jensen
2022-11-13 18:17 ` Juri Linkov
2022-11-13 19:17 ` Aaron Jensen
2022-11-14 7:50 ` Juri Linkov
2022-11-14 14:50 ` Aaron Jensen
2022-11-14 17:28 ` Juri Linkov
2022-11-14 18:11 ` Aaron Jensen
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.