mbrlabs / Lorien

Infinite canvas drawing/whiteboarding app for Windows, Linux and macOS. Made with Godot.
MIT License
5.55k stars 241 forks source link

Higher than expected CPU usage when drawing on the canvas #255

Open Gleek opened 1 year ago

Gleek commented 1 year ago

Lorien version:

v0.6.0

OS/device including version:

MacBook Pro 13 inch 2020 2 GHz Quad-Core Intel Core i5 Intel Iris Plus Graphics 1536 MB macOS - Ventura 13.3.1

Issue description:

I've found medium high levels of CPU (40-50%) when drawing on canvas. I'm not sure if it is expected, but it turns into the fans whirring at full speed with CPU temperatures getting high in sometime. This might also be related to the size of the canvas I'm editing as I don't feel the problem as much with the blank canvas as compared to, say, 30-40 minutes post slow writing. I'm not very sure of it though. In a very unscientific experiment, drawing on a blank canvas pushed the CPU to ~30% when drawing while editing a larger file made it shoot to ~50%.

This might be a macOS specific issue and I am unfortunately not very much aware of the workings of godot and not sure if I can profile the application and share the report with you. Let me know if it's easily possible somehow if the behavior is unexpected

Regards

Gleek commented 11 months ago

On further investigation it's not the CPU, but the GPU which is choking up causing the temperatures to rise dramatically. The GPU usage is at 100% when drawing on the canvas.

123789g commented 2 months ago

Seems like an OpenGL hint issue (at least on my end.) CPU Usage, especially on large canvases spikes through the roof when you use that AA method. Lightest Canvas I have that ended up showing this issue has 954 Strokes & 18979 Points.