High CPU usage on macOS?
See original GitHub issueDescribe the bug
After creating an app from the avalonia.app
and running it, I see high CPU usage on my Mac (approx 6-10% on a M1 Max). If I run the same project on Windows, I see very low CPU usage, which is expected from an application idling (0.48% on a 10700k).
Doing actions such as moving the mouse on the window sends the CPU up to 35% CPU, whereas on Windows it uses 8%.
To Reproduce Steps to reproduce the behavior:
dotnet new avalonia.app
dotnet run
Expected behavior After the application initialised, the CPU should drop down to a reasonable level.
Screenshots
Desktop (please complete the following information):
- OS: [e.g. Windows, Mac, Linux (State distribution)] macOS Ventura 13.3 (MacBook Pro, 14-inch, 2021, M1 Max)
- Version [e.g. 0.10.0-rc1 or 0.9.12] 0.10.18
Additional context Add any other context about the problem here. (Windows numbers were multiplied by x16 from the taskmgr value, as macOS uses per-core CPU values, whereas Windows uses totals)
Issue Analytics
- State:
- Created 5 months ago
- Comments:7 (3 by maintainers)
Top GitHub Comments
Well for me, I observed this pretty much constantly during last year in all versions I tried on MB Air M1…including latest 11.0.3 one. This is minimal repro I tried, even without rendering any window, cpu idle is constantly hanging somewhere around 7%. With or without window to render.
(this one is 11.0.3 with .net 8 preview)
It behaves the same way in the previous version.