Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CPU usage increases by a lot when multiple actions are given [VID] #898

Closed
LamprosPitsillos opened this issue Sep 1, 2021 · 10 comments
Closed

Comments

@LamprosPitsillos
Copy link

Using actions (-A) , if i wait a bit while rofi is beign shown (rofi instead of dmenu) , dunst gets to 40% cpu usage (and for some reason also picom)

A vid showcasing the problem

Installation info

  • Version: Dunst - A customizable and lightweight notification-daemon 1.6.1 (2021-02-21)
  • Install type: package
  • Distro and version: Artix Linux , 5.13.12-artix1-1

Config

[global]
    monitor = 0
    follow = none
    geometry = "0x300-30+40"
    progress_bar = true
    progress_bar_height = 10
    progress_bar_frame_width = 1
    progress_bar_min_width = 150
    progress_bar_max_width = 300
    indicate_hidden = yes
    shrink = no
    transparency = 0
    notification_height = 0
    separator_height = 2
    padding = 8
    horizontal_padding = 8
    text_icon_padding = 5
    frame_width = 1
    frame_color = "#FFB52A"
    separator_color = frame
    sort = yes
    idle_threshold = 120
    font = Fira Code 10
    line_height = 0
    markup = full
    format = "<big><b>%s</b></big>\n%b"
    alignment = right
    vertical_alignment = center
    show_age_threshold = 60
    word_wrap = yes
    ellipsize = middle
    ignore_newline = no
    stack_duplicates = true
    hide_duplicate_count = false
    show_indicators = yes
    icon_position = left
    min_icon_size = 0
    max_icon_size = 128
    icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/
    sticky_history = yes
    history_length = 20
    dmenu = /usr/bin/rofi -dmenu -p Dunst: 
    browser = /usr/bin/qutebrowser
    always_run_script = true
    title = Dunst
    class = Dunst
    startup_notification = false
    verbosity = mesg
    corner_radius = 0
    ignore_dbusclose = false
    force_xwayland = false
    force_xinerama = false
    mouse_left_click = do_action, close_current
    mouse_middle_click = close_all
    mouse_right_click = close_current
[experimental]
    per_monitor_dpi = false
[shortcuts]
[urgency_low]
    background = "#1E1E1E"
    foreground = "#888888"
    timeout = 10
[urgency_normal]
    background = "#1E1E1E"
    foreground = "#ffffff"
    highlight = "#FFB52A"
    timeout = 10
[urgency_critical]
    background = "#900000"
    foreground = "#ffffff"
    frame_color = "#ff0000"
    timeout = 0
@fwsmit
Copy link
Member

fwsmit commented Sep 3, 2021

Thank you for the bug report. I was able to reproduce it. I'm looking into it. It would be useful if you could git bisect the bug to see where it was introduced.

@LamprosPitsillos
Copy link
Author

Just tell me how to do it and I'll be glad to help , I know very little in terms of git but I'm trying to learn and contribute more.

@fwsmit
Copy link
Member

fwsmit commented Sep 3, 2021

Great that you're willing to help. Here's a guide for git bisect: https://git-scm.com/docs/git-bisect.
I've checked for you and it seems like v1.5.0 doesn't have the bug, so you can start with

$ git bisect start
$ git bisect bad                 # Current version is bad
$ git bisect good v1.5.0    # v1.5.0 is known to be good

@LamprosPitsillos
Copy link
Author

Sorry if i derailed this issue but what follows now?
I wrote some C , am an undergraduate.
How will you profile / debug this ?
I really wanna know since you're way more experienced.

@fwsmit
Copy link
Member

fwsmit commented Sep 5, 2021

Sorry if i derailed this issue but what follows now?
I wrote some C , am an undergraduate.
How will you profile / debug this ?
I really wanna know since you're way more experienced.

@LamprosPitsillos The first step I would suggest is to see in what commit introduced the bug. Once we know the change that introduced the bug, it's much simpler to diagnose.
This is done by using git bisect as explained in the guide above. Every time you try out one commit by compiling and running the code and see if the bug is present. To compile dunst, take a look at the wiki. To run it, simply write pkill dunst && ./dunst.

@fwsmit
Copy link
Member

fwsmit commented Sep 6, 2021

@LamprosPitsillos are you able to figure out the bisection?

@LamprosPitsillos
Copy link
Author

I have exams in 3 days, after that I plan to start contributing to OSS as much as possible, starting with this bug , but for now Fourier transforms come first 😁

@fwsmit
Copy link
Member

fwsmit commented Feb 18, 2022

If fixed it. Would you mind testing if the fix works for you and doesn't give any regressions?

@fwsmit fwsmit closed this as completed in 329c877 Feb 18, 2022
@LamprosPitsillos
Copy link
Author

If fixed it. Would you mind testing if the fix works for you and doesn't give any regressions?

Just cloned the repo , tried it for a couple of minutes. It is indeed fixed ,amazing! thank you!

@fwsmit
Copy link
Member

fwsmit commented Feb 18, 2022

Great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants