-
-
Notifications
You must be signed in to change notification settings - Fork 278
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
Wakeup reduction in EwmhDesktops #263
Conversation
Correct me if I'm wrong but I don't think the CI issue is due to my patch. |
@bgamari Ahh. Thanks for investigating this. I was wondering why CPU usage was so high. Thanks for doing the legwork to track this down. |
@bgamari I'm not convinced this is what is causing taffybar's high cpu usage. As far as I can tell, taffybar only attempts interface updates when there is an actual change. What led you to the conclusion that this was the cause? |
@IvanMalison I observed a marked reduction in taffybar's CPU usage and wakeup count after applying this patch. Note that I still consider taffybar's CPU usage to be too high: I still see it saturate a good fraction of a CPU when switching desktops and a pretty minimal configuration still idles around 3%. However, this patch certainly helped and I'm afraid I don't have time to look farther at the moment. |
Yes, I agree, this is likely due to the fact that taffybar simply redraws the entire workspace widget on any ewmh update. It shouldn't be too hard to have it avoiding redraws for window icons when nothing has changed.
If I remove the clock and graph widgets i get 0% idle. I know you said that you don't have time to investigate, but could you try disabling those widgets and seeing if you see the same thing? Continue discussion at taffybar/taffybar#385 to avoid spamming xmonad-contrib |
LGTM 👍 |
Is there a reason this hasn't been merged? |
No reason, just not enough round tuits to go round, I guess... |
Description
Previously the
EwmhDesktops
was painfully naive, sending property updates every time the log hook was invoked, even if none of the affected properties actually changed in value. This hurts significantly since it can cause a slew of unnecessary wakeups. Here we refactor the EWMH implementation to cache the current property value and only send updates if the value actually changes.Previously
xmonad
was consistently sitting at 5% CPU usage when I was using my system (andtaffybar
even higher as it redraws its entire window when desktop names change). With this patch it sites at < 1%, exactly where it should be.Fixes #227.
Checklist
I've read CONTRIBUTING.md
I tested my changes with xmonad-testing
I updated the
CHANGES.md
file