Created attachment 8429
Moving the mouse cursor in circles result in 30% CPU use by xfdesktop and 20% use by Xorg
Created attachment 8430
Created attachment 8431
I do see a small increase in CPU usage (both xfdesktop and Xorg), but the same happens when placing and moving the mouse cursor over Thunar or Mousepad.
While my hardware is not powerful (it's a dual core thin client) this is still an order of magnitude worse than e.g. Windows. After all, XFCE "aims to be fast and low on system resources". I am willing to help profile this but I'll need some directions as to preferred instrumentation.
On AMD E1-6010 (AMD Mullins 1.4GHz Dual-Core) with Xfce XFWM4 v4.13.1 with compositing ON on Fedora 30 beta I found that
- Booting into Xfce & opening a terminal with top has Xorg using 4%.
- Moving the mouse in circles above xfdesktop brings Xorg up to 10.5% and xfdesktop to 10%.
- Opening thunar and moving the mouse in circles above the file list area brings Xorg to 30% and Thunar to 15% CPU usage. This seems high.
- Moving the mouse in circles above empty space below the devices/places/network left side-bar area has CPU usage at 9% for Xorg and 4% for thunar
- Moving the mouse in circles above the populated part of the sidebar and the icon toolbar brings CPU to to 40% for Xorg and 25% for thunar
For comparison, playing APink's %% musicvideo coded as x264 at 720p with mpv using vaapi hardware decoding & terminal window with top above that has Xorg using 20% and mpv 15% CPU. That's less CPU used than what's used when moving the mouse in circles above the top part of the sidebar and the icon toolbar.
I typed dnf -y update on that slow old outdated laptop which was weak to begin with so I won't be able to do further testing for hours.
On AMD E1-6010 in the ultimate window-manager fluxbox which I used when the Pentium II was hot technology moving the mouse in circles on the background uses 3.3-4% CPU by Xorg. This doesn't change after loading a wallpaper with xloadimage -onroot wjsn.jpg.
Starting thunar with a terminal running top visible below and
- moving the mouse fast in circles on devices/places/network side uses 20% Xorg, 25% Thunar
- moving the mouse fast in circles above the file listings uses 25% Xorg, 30% Thunar
- moving the mouse fast in a circle covering the icon toolbar, sidebar and file listing uses 25% Xorg, 30% Thunar
While somewhat irrelevant it's data-points of interest. Moving the mouse in circles above the wallpaper in XFCE4 used 10.5% CPU by Xorg and 10% by xfdesktop which is double the Xorg CPU usage (xfdesktop can't be compared to fluxbox because fluxbox doesn't really care what's going on in the root window).
the thunar CPU usage figures are high and in the same ball-park regardless of fluxbox or xfwm4.
dolphin in fluxbox:
- moving the mouse fast in circles on the places/remote/search for sidebar puts Xorg at 15%, dolphin at 20%
- moving the mouse fast in circles above the file listing makes Xorg use 20%, dolphin 35%,
- moving the mouse fast in a circle covering the icon toolbar, sidebar and file listing results in 23% Xorg use, dolphin 35%.
It looks like the usage for thunar is barely higher than dolphin (just tested because Qt/KDE differs from GTK).
Not sure there is too much XFCE developers could do about what appears to be Xorg and GTK/Qt toolkit overhead.
As for use-case.. I can't say I've ever rapidly moved the mouse in circles above an application like I did for this testing during any kind of work or entertainment.
JM, any news on this issue? We need to know if the behavior is specific to xfdesktop or Xfce in general. Based on the test results from Öyvind we have to assume that Xorg is to blame.
I would like to try and profile this to see where it spends most of the cpu time but I don't know what's the preferred way to do it (perf, gprof, valgrind?)
Sadly, I am not familiar with performance analysis tools. Any data would be helpful, especially when compared to other applications like Thunar, Mousepad, and so on.
Created attachment 8565
Compressed file with backtraces from Mousepad, Thunar and xfdesktop while idle and moving the mouse
I installed Xfce 4.14 PPA on Xubuntu Disco and am testing it, I have noticed that moving the mouse does increase CPU load on all programs. The computer I'm testing now has a Intel Core i3-6100U and Intel HD Graphics 520.
(The values below are approximated)
htop shows that moving the mouse over a program window increases the program total CPU load by around 0,8% and Xorg CPU load increases by 0,3% too. This was noticed on all programs I tested, including programs not exclusive to Xfce4, as Audacious and Tilix.
While I was able to get a Mousepad backtrace showing its actions while moving the mouse, the CPU load increase is the "normal" CPU load increase for all programs.
For xfdesktop, however, the increase is closer to 1,3% CPU load and Xorg load 2%. The gdb backtrackes while the mouse is being moved have data related to the mouse movement much more often than other programs.
Thunar does have 2% CPU usage if moving the mouse quickly over icons and the "normal" CPU load when not over icons. Xorg CPU usage increases 0,5% when moving the mouse over the icons.
I'm unable to find the debug symbols for the Xfce 4.14 PPA debug symbols, which makes the backtraces a bit incomplete. Where can I find the debug symbols for the Xfce 4.14 PPA?
-- GitLab Migration Automatic Message --
This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity.
You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/xfce/xfdesktop/-/issues/46.
Please create an account or use an existing account on one of our supported OAuth providers.
If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests
Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev