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

This subforum contains all the issues which we already resolved.
JakubW
Burner Inserter
Burner Inserter
Posts: 15
Joined: Sat May 04, 2019 12:36 pm
Contact:

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

Post 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).
Rseding91
Factorio Staff
Factorio Staff
Posts: 14250
Joined: Wed Jun 11, 2014 5:23 am
Contact:

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

Post 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.
If you want to get ahold of me I'm almost always on Discord.
orzelek
Smart Inserter
Smart Inserter
Posts: 3922
Joined: Fri Apr 03, 2015 10:20 am
Contact:

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

Post 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)?
Rseding91
Factorio Staff
Factorio Staff
Posts: 14250
Joined: Wed Jun 11, 2014 5:23 am
Contact:

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

Post 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.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Resolved Problems and Bugs”