The CPU overhead of input appears to be approximately 2-6x higher with WinUI 3 compared to WinUI 2.
(Sometimes >100x higher in case of a blinking cursor, which is really a tad bit too much for a cursor.)
This is most noticeable during cursor movements inside a WinUI 3 app. These cause it to continuously use ~80% of one of my CPU cores while not actively drawing anything. We should fix that to improve our user's battery life. 💪
Steps to reproduce the bug
Either: Build a Blank App using WinUI's template projects
Or: Download the "WinUI 3 Controls Gallery" app from the store
Move your cursor within the app - make sure not to accidentally hover any element (so that nothing gets drawn)
For a comparison do the same in either of these:
Windows' Settings app
Windows Terminal's Settings page
Expected behavior
The CPU usage during cursor movements should be the same.
Optimally the CPU usage should be on par with a ComCtl or WPF one (e.g. regedit/SizeBench), which is approx. 10x less.
Screenshots
While moving my cursor inside the WinUI 3 Controls Gallery:
This is on a 32 core machine. 3.125 in the "CPU" column would equate to 100% usage of a single CPU core.
I made sure that the FPS of the application remains at 0 (i.e. no actually expensive work being done).
Describe the bug
The CPU overhead of input appears to be approximately 2-6x higher with WinUI 3 compared to WinUI 2. (Sometimes >100x higher in case of a blinking cursor, which is really a tad bit too much for a cursor.)
This is most noticeable during cursor movements inside a WinUI 3 app. These cause it to continuously use ~80% of one of my CPU cores while not actively drawing anything. We should fix that to improve our user's battery life. 💪
Steps to reproduce the bug
For a comparison do the same in either of these:
Expected behavior
The CPU usage during cursor movements should be the same. Optimally the CPU usage should be on par with a ComCtl or WPF one (e.g. regedit/SizeBench), which is approx. 10x less.
Screenshots
While moving my cursor inside the WinUI 3 Controls Gallery:
This is on a 32 core machine. 3.125 in the "CPU" column would equate to 100% usage of a single CPU core. I made sure that the FPS of the application remains at 0 (i.e. no actually expensive work being done).
NuGet package version
WinUI 3 - Windows App SDK 1.0
Windows app type
Device form factor
Desktop
Windows version
Insider Build (22559)
Additional context
No response