Page 1 of 1

[Rseding91] [1.1.7]"Unnecessary" character gui updates with set_personal_logistic_slot

Posted: Thu Jan 07, 2021 11:17 am
by Choumiko
The game lags/freezes when the character gui is open and a mod changes a lot/all the personal logistic requests. The lag is barely noticeable when the character gui is not open but the code the mod executes is the same.

To reproduce:
- Load the attached save
- Open the character gui
- Walk left/right to enter/leave the logistics area. Notice the lag

The original report i got was with a modded game, where the player had more than 600 different item requests configured, but even with "only" 240 in the save it is noticeable.

Breakdown of what my mod does when the player enters/leaves the network:
- Read the request configuration from global
- Go over each request slot and either clear it or set the min/max values according to the request configuration (or set max to infinite if not in a certain logistics network)
It is all done during the on_player_changed_position event in a for loop.

I guess after each call to LuaControl.set_personal_logistic_slot the GUI gets recreated/updated, leading to more than 240 gui changes during a single tick, when 1 update at the end should be enough?

I've made 2 interface requests which should help with the issue, since i guess that this report is either a Won't fix or Not a bug

viewtopic.php?f=28&t=94014
viewtopic.php?f=28&t=94016

Re: [Rseding91] [1.1.7]"Unnecessary" character gui updates with set_personal_logistic_slot

Posted: Thu Jan 07, 2021 5:10 pm
by Rseding91
Thanks for the report. It's now fixed for the next release.