Page 1 of 1

[Rseding91] [0.17.79] High CPU usage in Mods->Install page

Posted: Sun Dec 29, 2019 2:51 pm
by JakubW
Hi, I'm running LInux Mint 19.3 Linux Mint 19.3 Cinnamon

My CPU: Intel© Core™ i5-8250U CPU @ 1.60GHz × 4
When I open Mods -> Install page one core (thread) of my CPU gets 100% usage.
This disappear when I switch to Manage/Updates tab or close Mods section.

Please take a look at it:


Edit: I checked also on Windows 10 1703 on the same machine. The effect is similar, but high usage is more spread between cores. InManage page I have ~3% CPU usage (for Factorio.exe) and in Install tab I have ~17% CPU usage (Factorio.exe only).

Re: [Rseding91] [0.17.79] High CPU usage in Mods->Install page

Posted: Mon Dec 30, 2019 2:51 am
by Rseding91
Thanks for the report. The high CPU usage is due to the logic checking if it should render all of the stuff in the scroll pane (and there being a *lot* of mods in it).

I found some things to improve on the performance but it still takes more CPU time to show that tab than the others.

Re: [Rseding91] [0.17.79] High CPU usage in Mods->Install page

Posted: Mon Dec 30, 2019 1:22 pm
by orzelek
Rseding91 wrote: Mon Dec 30, 2019 2:51 am Thanks for the report. The high CPU usage is due to the logic checking if it should render all of the stuff in the scroll pane (and there being a *lot* of mods in it).

I found some things to improve on the performance but it still takes more CPU time to show that tab than the others.
Does it check every render even if scroll pane is not moved and there is no new info to show (no new downloaded data etc)?

Re: [Rseding91] [0.17.79] High CPU usage in Mods->Install page

Posted: Mon Dec 30, 2019 4:12 pm
by Rseding91
The way widget rendering works is: start at the top widget and call "draw recursive on each child widget" -> repeat for each child widget.

The things outside the scroll pane view don't get drawn but the logic to check if they should be drawn was slow. I made it faster.