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

This subforum contains all the issues which we already resolved.
Post Reply
Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

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

Post 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
Attachments
AT_laggy.zip
(732.36 KiB) Downloaded 28 times

Rseding91
Factorio Staff
Factorio Staff
Posts: 11923
Joined: Wed Jun 11, 2014 5:23 am
Contact:

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

Post by Rseding91 »

Thanks for the report. It's now fixed for the next release.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Resolved Problems and Bugs”