High CPU usage on Raspberry Pi
See original GitHub issueDescribe the bug
A skeleton project (just the default project created by the VS extension, with a blank window) takes about 30% CPU usage on a Raspberry Pi 4.
Tested on net5.0 and netcoreapp3.1, Avalonia version 0.10.0 (the myget versions are failing to restore due to version mismatches).
I’ve attached a trace captured with dotnet trace which can be opened with PerfView here: trace.zip. A couple of screenshots below:


… it seems to be spending all of its time in unmanaged code, which dotnet trace isn’t particularly good at picking up!
strace shows a lot of activity, a good chunk of it cacheflush calls. I’ve attached the first 1s of strace output here: strace.txt.
To Reproduce Steps to reproduce the behavior:
- Use VS to create a new empty Avalonia project.
- Run this on a Rapsberry Pi 4
- Observe CPU usage
Desktop (please complete the following information):
- OS: Raspbian 10
- Version: 0.10.0
Issue Analytics
- State:
- Created 2 years ago
- Comments:16 (6 by maintainers)

Top Related StackOverflow Question
Unmanaged code from dispatcher run loop is
epoll_wait(basically sleep). Unmanaged code fromSleepLoopRenderTimerisThread.SleepI wonder why it spends so much time finalizing SkiaSharp’s objects since we are disposing most of them except imagesOh! Having said that, a few deploys later and the CPU is down into the low single digits. I figure this is solved, thanks all!