[GH-ISSUE #1467] CPU Performance Regresson #1853

Closed
opened 2026-05-22 22:54:58 +01:00 by JakeStanger · 4 comments
Owner

Originally created by @CameronBarnes on GitHub (Apr 25, 2026).
Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/1467

Describe the bug

In prior versions, ie 0.18, CPU usage for ironbar on my system sits around 0% the vast majority of the time. Building and running the latest version from github consistently shows a CPU usage of what appears to be between 8-17% across all 16/32 cores/threads of my 7950x.

Git bisect has narrowed down the cause of the problem to the following commit 2cb9288980

This appears to me to be unrelated to #1425, as this issue occurs consistently and immediately when running ironbar.

To reproduce
Steps to reproduce the behavior:

  1. Run ironbar
  2. Observe CPU usage is high

Expected behavior

Previously CPU usage of ironbar was near 0, definitely preferable for my taskbar to not be holding my CPU at a constant 60C

System information:

  • Distro: Arch Linux, 6.19.11-zen1-1-zen
  • Compositor: Hyprland 0.54.3
  • Ironbar version: ironbar 0.19.0-pre, master, 742fe7f4f1

Configuration

Config
let {
	$focused = {
		type = "focused"
		truncate = "end"
		icon_size = 16
	}

	$battery = {
		type = "battery"
		show_if = "ls /sys/class/power_supply/ | grep --quiet '^BAT'"
	}
	$sys_info = {
		type = "sys_info"
		format = ["{memory_percent}% " "{cpu_percent}% " "{temp_c@k10temp Tccd2}°C "]
		interval.cpu = 1
	}
	$volume = {
		type = "volume"
		sink_slider_orientation = "horizontal"
		source_slider_orientation = "vertical"

		on_click_right = "pavucontrol"
		on_scroll_up = "pamixer -ui 2 && pamixer --get-volume > \u0024SWAYSOCK.wob"
		on_scroll_down = "pamixer -ud 2 && pamixer --get-volume > \u0024SWAYSOCK.wob"
	}
	$tray = { type = "tray" }
	$clock = {
		type = "clock"
		format = "%a %B %e, %Y %l:%M %p"
	}
	$weather = {
		type = "custom"
		class = "weather"

		bar = [ { type = "button" label = "#weather_current" on_click = "popup:toggle" } ]
		popup = [ {
			type = "box"
			orientation = "vertical"

			widgets = [
				{ type = "label" name = "header" label = "Forecast" }
				{
					type = "box"
					widgets = [
						{ type = "box" name="dates" orientation = "vertical" widgets = [
							{ type = "label" class="weather-date" label = "#weather_date_0" }
							{ type = "label" class="weather-date" label = "#weather_date_1" }
							{ type = "label" class="weather-date" label = "#weather_date_2" }
						]}
						{ type = "box" name="temps" orientation = "vertical" widgets = [
							{
							  type = "box"
							  widgets = [
								  { type = "label" class="weather-high" label = " #weather_high_0" }
								  { type = "label" class="weather-avg" label = " #weather_avg_0" }
								  { type = "label" class="weather-low" label = " #weather_low_0" }
							  ]
						  }
						  {
							  type = "box"
							  widgets = [
								  { type = "label" class="weather-high" label = " #weather_high_1" }
								  { type = "label" class="weather-avg" label = " #weather_avg_1" }
								  { type = "label" class="weather-low" label = " #weather_low_1" }
							  ]
						  }
						  {
							  type = "box"
							  widgets = [
								  { type = "label" class="weather-high" label = " #weather_high_2" }
								  { type = "label" class="weather-avg" label = " #weather_avg_2" }
								  { type = "label" class="weather-low" label = " #weather_low_2" }
							  ]
						  }
						] }
					]
				}
			]
		} ]
	}
	$end_section = [ $battery $sys_info $volume $clock $tray ]

} in {
	monitors.HDMI-A-1 = {
		position = "top"
		height = 24
		popup_autohide = true

		start = [
			{
				type = "workspaces"
				hidden = ["special:magic"]
				favorites = ["11" "12" "13" "14" "15"]
				all_monitors = true
			}
			$weather
		]
		center = [ $focused ]
		end = $end_section
	}
	monitors.DP-2 = {
		position = "top"
		height = 24
		popup_autohide = true

		start = [
			{
				type = "workspaces"
				hidden = ["special:magic"]
				favorites = ["6" "7" "8" "9" "10"]
				all_monitors = true
			}
			$weather
		]
		center = [ $focused ]
		end = $end_section
	}
	monitors.DP-1 = {
		position = "top"
		height = 24
		autohide = 3000
		start_hidden = false
		popup_autohide = true

		start = [
			{
				type = "workspaces"
				hidden = ["special:magic"]
				favorites = ["1" "2" "3" "4" "5"]
				all_monitors = true
			}
			$weather
		]
		center = [ $focused ]
		end = $end_section
	}
}

Styles
:root {
    --color-dark-primary: #1c1c1c;
    --color-dark-secondary: #2d2d2d;
    --color-white: #fff;
    --color-active: #6699cc;
    --color-urgent: #8f0a0a;

    --margin-lg: 1em;
    --margin-sm: 0.5em;
}

* {
    border-radius: 0;
    border: none;
    box-shadow: none;
    background-image: none;
    font-family: monospace;
	font-size: 17px;
	font-weight: 600;
}

scale > trough {
    background-color: var(--color-dark-secondary);
}

scale > trough > highlight {
    background-color: var(--color-active);
    border-style: solid;
    border-color: var(--color-active);
    border-width: 0.2em;
}

scale > trough > slider {
    background-color: var(--color-white);
}

switch > slider {
    background-color: var(--color-white);
}

switch:checked {
    background-color: var(--color-active);
}

switch:not(:checked) {
  background-color: var(--color-dark-secondary);
}

#bar, popover, popover contents, calendar {
    background-color: var(--color-dark-primary);
}

box, button, label {
    background-color: #0000;
    color: var(--color-white);
}

button {
    padding-left: var(--margin-sm);
    padding-right: var(--margin-sm);
}

button:hover, button:active {
    background-color: var(--color-dark-secondary);
}

#end > * + * {
    margin-left: var(--margin-lg);
}

.clock {
    font-weight: bold;
}

.popup-clock .calendar-clock {
    font-size: 2.0em;
}

.popup-clock .calendar .today {
    background-color: var(--color-active);
}

.popup-clock .calendar .other-month {
	color: gray;
}

.workspaces .item.visible {
    box-shadow: inset 0 -1px var(--color-white);
}

.workspaces .item.focused {
    box-shadow: inset 0 -1px var(--color-active);
    background-color: var(--color-dark-secondary);
}

.workspaces .item.urgent {
    background-color: var(--color-urgent);
}

.sysinfo .item {
	border-left: 1px solid;
	border-right: 1px solid;
	border-color: gray;
	padding-left: 15px;
	padding-right: 15px;
	margin-left: -5px;
	margin-right: -5px;
}

Additional Info

I did a flamegraph and saw what appears to be an abnormal amount of signaling and hash related functions going on. But I honestly havent used flamegraphs that much and may have setup either the known good or the bad state run incorrectly or just misread the results.

Originally created by @CameronBarnes on GitHub (Apr 25, 2026). Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/1467 **Describe the bug** <!-- A clear and concise description of what the bug is. --> In prior versions, ie 0.18, CPU usage for ironbar on my system sits around 0% the vast majority of the time. Building and running the latest version from github consistently shows a CPU usage of what appears to be between 8-17% across all 16/32 cores/threads of my 7950x. Git bisect has narrowed down the cause of the problem to the following commit 2cb92889808e9f4cb9f23ec87fa9aa3893ae7a7e This appears to me to be unrelated to #1425, as this issue occurs consistently and immediately when running ironbar. **To reproduce** Steps to reproduce the behavior: 1. Run ironbar 2. Observe CPU usage is high **Expected behavior** <!-- A clear and concise description of what you expected to happen. --> Previously CPU usage of ironbar was near 0, definitely preferable for my taskbar to not be holding my CPU at a constant 60C **System information:** - Distro: Arch Linux, 6.19.11-zen1-1-zen - Compositor: Hyprland 0.54.3 - Ironbar version: ironbar 0.19.0-pre, master, 742fe7f4f196185016bb2363682ab7a60bc70e40 **Configuration** <!-- Share your bar configuration and stylesheet as applicable: --> <details><summary>Config</summary> ``` let { $focused = { type = "focused" truncate = "end" icon_size = 16 } $battery = { type = "battery" show_if = "ls /sys/class/power_supply/ | grep --quiet '^BAT'" } $sys_info = { type = "sys_info" format = ["{memory_percent}% " "{cpu_percent}% " "{temp_c@k10temp Tccd2}°C "] interval.cpu = 1 } $volume = { type = "volume" sink_slider_orientation = "horizontal" source_slider_orientation = "vertical" on_click_right = "pavucontrol" on_scroll_up = "pamixer -ui 2 && pamixer --get-volume > \u0024SWAYSOCK.wob" on_scroll_down = "pamixer -ud 2 && pamixer --get-volume > \u0024SWAYSOCK.wob" } $tray = { type = "tray" } $clock = { type = "clock" format = "%a %B %e, %Y %l:%M %p" } $weather = { type = "custom" class = "weather" bar = [ { type = "button" label = "#weather_current" on_click = "popup:toggle" } ] popup = [ { type = "box" orientation = "vertical" widgets = [ { type = "label" name = "header" label = "Forecast" } { type = "box" widgets = [ { type = "box" name="dates" orientation = "vertical" widgets = [ { type = "label" class="weather-date" label = "#weather_date_0" } { type = "label" class="weather-date" label = "#weather_date_1" } { type = "label" class="weather-date" label = "#weather_date_2" } ]} { type = "box" name="temps" orientation = "vertical" widgets = [ { type = "box" widgets = [ { type = "label" class="weather-high" label = " #weather_high_0" } { type = "label" class="weather-avg" label = " #weather_avg_0" } { type = "label" class="weather-low" label = " #weather_low_0" } ] } { type = "box" widgets = [ { type = "label" class="weather-high" label = " #weather_high_1" } { type = "label" class="weather-avg" label = " #weather_avg_1" } { type = "label" class="weather-low" label = " #weather_low_1" } ] } { type = "box" widgets = [ { type = "label" class="weather-high" label = " #weather_high_2" } { type = "label" class="weather-avg" label = " #weather_avg_2" } { type = "label" class="weather-low" label = " #weather_low_2" } ] } ] } ] } ] } ] } $end_section = [ $battery $sys_info $volume $clock $tray ] } in { monitors.HDMI-A-1 = { position = "top" height = 24 popup_autohide = true start = [ { type = "workspaces" hidden = ["special:magic"] favorites = ["11" "12" "13" "14" "15"] all_monitors = true } $weather ] center = [ $focused ] end = $end_section } monitors.DP-2 = { position = "top" height = 24 popup_autohide = true start = [ { type = "workspaces" hidden = ["special:magic"] favorites = ["6" "7" "8" "9" "10"] all_monitors = true } $weather ] center = [ $focused ] end = $end_section } monitors.DP-1 = { position = "top" height = 24 autohide = 3000 start_hidden = false popup_autohide = true start = [ { type = "workspaces" hidden = ["special:magic"] favorites = ["1" "2" "3" "4" "5"] all_monitors = true } $weather ] center = [ $focused ] end = $end_section } } ``` </details> <details><summary>Styles</summary> ```css :root { --color-dark-primary: #1c1c1c; --color-dark-secondary: #2d2d2d; --color-white: #fff; --color-active: #6699cc; --color-urgent: #8f0a0a; --margin-lg: 1em; --margin-sm: 0.5em; } * { border-radius: 0; border: none; box-shadow: none; background-image: none; font-family: monospace; font-size: 17px; font-weight: 600; } scale > trough { background-color: var(--color-dark-secondary); } scale > trough > highlight { background-color: var(--color-active); border-style: solid; border-color: var(--color-active); border-width: 0.2em; } scale > trough > slider { background-color: var(--color-white); } switch > slider { background-color: var(--color-white); } switch:checked { background-color: var(--color-active); } switch:not(:checked) { background-color: var(--color-dark-secondary); } #bar, popover, popover contents, calendar { background-color: var(--color-dark-primary); } box, button, label { background-color: #0000; color: var(--color-white); } button { padding-left: var(--margin-sm); padding-right: var(--margin-sm); } button:hover, button:active { background-color: var(--color-dark-secondary); } #end > * + * { margin-left: var(--margin-lg); } .clock { font-weight: bold; } .popup-clock .calendar-clock { font-size: 2.0em; } .popup-clock .calendar .today { background-color: var(--color-active); } .popup-clock .calendar .other-month { color: gray; } .workspaces .item.visible { box-shadow: inset 0 -1px var(--color-white); } .workspaces .item.focused { box-shadow: inset 0 -1px var(--color-active); background-color: var(--color-dark-secondary); } .workspaces .item.urgent { background-color: var(--color-urgent); } .sysinfo .item { border-left: 1px solid; border-right: 1px solid; border-color: gray; padding-left: 15px; padding-right: 15px; margin-left: -5px; margin-right: -5px; } ``` </details> **Additional Info** I did a flamegraph and saw what appears to be an abnormal amount of signaling and hash related functions going on. But I honestly havent used flamegraphs that much and may have setup either the known good or the bad state run incorrectly or just misread the results.
JakeStanger 2026-05-22 22:54:58 +01:00
  • closed this issue
  • added the
    T:Bug
    label
Author
Owner

@JakeStanger commented on GitHub (Apr 25, 2026):

Hm, I fixed that regression recently, or so I thought.

github.com/JakeStanger/ironbar@7210ad767c

I know it sounds silly but could you double check you're definitely experiencing the issue on commits past that please?

<!-- gh-comment-id:4318762827 --> @JakeStanger commented on GitHub (Apr 25, 2026): Hm, I fixed that regression recently, or so I thought. https://github.com/JakeStanger/ironbar/commit/7210ad767ca12832eee03067fc4d6a1db048a4dd I know it sounds silly but could you double check you're definitely experiencing the issue on commits past that please?
Author
Owner

@CameronBarnes commented on GitHub (Apr 25, 2026):

Huh. I was pretty sure that I had tried manually building directly from master. But doing so now appears fine. It's possible that I was expecting ironbar-git from the aur to actually be the latest commit. I suppose I'm liable to make mistakes like that when frustrated at 2am. My apologies for the inconvenience here.
I've cargo installed directly from git so I shouldnt make that mistake again.

<!-- gh-comment-id:4320088123 --> @CameronBarnes commented on GitHub (Apr 25, 2026): Huh. I was pretty sure that I had tried manually building directly from master. But doing so now appears fine. It's possible that I was expecting ironbar-git from the aur to actually be the latest commit. I suppose I'm liable to make mistakes like that when frustrated at 2am. My apologies for the inconvenience here. I've cargo installed directly from git so I shouldnt make that mistake again.
Author
Owner

@JakeStanger commented on GitHub (Apr 25, 2026):

No worries, glad to hear it is sorted. The AUR package should pull the latest commit, although depending on your aur helper you might sometimes need to sync the database or give it a kick to behave.

<!-- gh-comment-id:4320092545 --> @JakeStanger commented on GitHub (Apr 25, 2026): No worries, glad to hear it is sorted. The AUR package should pull the latest commit, although depending on your aur helper you might sometimes need to sync the database or give it a kick to behave.
Author
Owner

@CameronBarnes commented on GitHub (Apr 25, 2026):

It doesnt help that at the time the AUR was down because it's getting DDOS'd again right now.

<!-- gh-comment-id:4320217057 --> @CameronBarnes commented on GitHub (Apr 25, 2026): It doesnt help that at the time the AUR was down because it's getting DDOS'd again right now.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
JakeStanger/ironbar#1853
No description provided.