Created attachment 8043 high cpu usage with theme and plugins When using some gtk3 themes such as those (https://www.opendesktop.org/p/1246387/) with the Whisker and Pulse Audio plugins added to the panel, an entire cpu core is utilized 100% by the Xorg process, with /usr/lib/xfce4/panel/wrapper-2.0 using ~15% of a core for each plugin. Themes such as Adwaita, Breeze, Breath, Vertex Maia etc cause no issues even with the plugins added to the panel. Removing the mentioned plugins or changing the problematic theme solves the issue. Please give me the instructions on how to troubleshoot the issue further.
Created attachment 8044 normal cpu usage after removing the plugins
Actions plugin (lock, logout etc) also causes high cpu usage.
I found that any plugin that uses GtkButton (or any of its descendants) displays the high cpu usage. Even sample-plugin misbehaves if "gtk_label_new (_("Sample"));" gets replaced by "gtk_button_new_with_label (_("Sample"));". Wrapping the button in a GtkBox makes no difference. Probably the theme is doing something bizarre with buttons and needs an exception to buttons in xfce4-panel, just a random guess.
Perf profiling and a slight increase in the gpu temperature when using a problematic plugin show that the gpu is also being used. The theme has a lot of animations. Maybe some animation doesn't work right for GtkButton in the panel and constantly triggers a redraw or something. Just guessing too. Anyway, I will notify the theme developer of your findings.
Created attachment 8049 gpu being used
After replacing the buttons section in gtk.css of the theme (https://www.opendesktop.org/p/1246387/) with the button section of Materia-Dark theme (https://github.com/nana-4/materia-theme), the issue is resolved; there's no cpu or gpu usage with the taskbar plugins any more. Something in the theme's button section is triggering the high cpu/gpu usage from xfce panel plugins.
Thanks for reporting and informing the theme author about this, but since it's a theme bug I'm going to close this report. Please reopen if there is anything to be fixed on our end.