[GS] Screen freezes/stutters when you select idle builders in late game

I've seen @dshirk comment on several of the threads in the Bug Reports sub-forum, but I haven't seen any "official" comment yet concerning this issue. Do we know whether FXS is even aware of this?

They probably are not aware. Perhaps this should be moved into Bug Reports.
 
Thanks

Moderator Action: I've also edited OP to include the relevant information
 
The game lacks optimization and I suspect the next patch addresses this issue. It is the entire game it is NOT just due to builders or large worlds. It is just the game had a ton added to it and game companies rely far to much on patching rather then fix on the spot like the good ole days.
 
I can eliminate the lag completely by changing the line in UnitPanel.lua from:
Code:
bCanStart, tResults = UnitManager.CanStartOperation(pUnit, actionHash, nil, tParameters, true);
to
Code:
bCanStart, tResults = UnitManager.CanStartOperation(pUnit, actionHash, nil, tParameters, false, false);

From code comments: for 2nd last boolean, false means "No exclusion test" and the last boolean means "No results". I suspect the exclusion test is the inefficient part. Not sure whether this change will only have UI impact.


Unfortunately this didn't solve the issue. I have both Terra Mirabilis and More lenses. Other mods are:
Wonder Nationwide Redux
Early Diplomatic Victory Resolution
Colorized Historic Moments
Good Goody Huts
Mutually Exclusive Removal
Play Your Custom Maps
Historic Speed (Extended Eras)
Civilization 5 Version Isabella - Spain

System has no issue for the past. The issue started on as early as turn 37 and the game is basically a halt by turn 70. I really love both Terra Mirabilis and More lenses but this has been painful so far.

Edit: My apologies. My fat finger slipped and typed the wrong codes. It actually worked with Terra Mirabilis. I will test with More Lenses later.

2nd Edit: This LUA change solved this issue with the forementioned mods. Thank you very much for your effort!
 
Last edited:
This was a deeper issue exposed by some of the mods that were generous with adding new requirements, etc. The team has some optimizations almost ready that should kill it. Not in time for the current release unfortunately, but know that it's addressed for the future.
 
This was a deeper issue exposed by some of the mods that were generous with adding new requirements, etc. The team has some optimizations almost ready that should kill it. Not in time for the current release unfortunately, but know that it's addressed for the future.

Can you suggest anything we can do in the meantime to minimise the lag?
 
Glad I found this thread as I'm experiencing the issue as well. Happy to find out the issue is being addressed, although the lag is absolutely obnoxious!
 
This was a deeper issue exposed by some of the mods that were generous with adding new requirements, etc. The team has some optimizations almost ready that should kill it. Not in time for the current release unfortunately, but know that it's addressed for the future.

Hi dshirk,

what would that mean? When will the fix be incorporated?

Not sure if you are fully aware of the scope of this issue. You basically cannot go past Renaissance due to this flaw (unless you decide to continue without builders).
I strongly recommend to raise the priority of this and hold the next release until this issue is fixed - to me it is a blocker.

Maybe simply a configuration option to turn off builder recommendations would do the trick for now.
 
Not sure if you are fully aware of the scope of this issue. You basically cannot go past Renaissance due to this flaw (unless you decide to continue without builders).
I strongly recommend to raise the priority of this and hold the next release until this issue is fixed - to me it is a blocker.

The reason this is not higher priority is because it only emerges with mods - it doesn't affect the base game in a noticeable way as far as I know.
 
I have late game freeze - not only with workers but basically everything: scrollng, selecting anything, moving a unit, etc...
 
Tried Deliverator's UnitPanel.lua code fix in the base game initially to no avail. After some additional searching, I found that Concise UI - Unit List uses the same base UnitPanel.lua file, so changed the UnitManager.CanStartOperation line there as well. Now the worker lag is gone!
FTR, I looked for other mods that contain UnitManager.CanStartOperation but found none (and I have lot of mods).
Thanks, @Deliverator!
 
Tried Deliverator's UnitPanel.lua code fix in the base game initially to no avail. After some additional searching, I found that Concise UI - Unit List uses the same base UnitPanel.lua file, so changed the UnitManager.CanStartOperation line there as well. Now the worker lag is gone!
FTR, I looked for other mods that contain UnitManager.CanStartOperation but found none (and I have lot of mods).
Thanks, @Deliverator!
I can't find this UnitManager.CanStartOperation line in the mod...
 
Of the mod's files?... I will check that...

It depends which mod you are talking about and how that mod overrides the UnitPanel.lua functions. Terra Mirabilis has a Lua file called TM_UnitPanel.lua which just replaces the GetUnitActionsTable function only.
 
Whilst the builder lag isn't as crippling as it was before the recent patch, I'm still getting it and it's still painful. Not sure if it helps track down the cause, but it starts without fail around turn 200, as far as I can tell regardless of era progress. I'm running a larger than normal map size (170 x 100, currently).

I've been keeping an eye on things in case my PC was causing the problem, but at the height of the lag it's showing CPU and GPU use between 20 - 30%. On the final turn of my last game, memory usage hit 40% (with other ~stuff~ running in the background. I assume the other apps aren't causing the problem as it still exists when I shut everything else down before playing.

Specs: i9 9900K / RTX 2080 / 32GB 2.6GHz RAM / Aorus Master motherboard.

Moderator Action: Merged with existing Bug Report thread — Browd
 
Last edited by a moderator:
Mid-late game builder lag is happening to me again as well. I tried the original UnitPanel.lua code fix by @Deliverator and it eliminated the lag BUT it removed builder improvement options from the UI. I could move builders but there were no icons for build farm, mine, etc, rendering them useless. So I reverted changes and am just living with the lag.

Last time, I was able to apply the fix to the Concise UI UnitPanel.lua, but it's been overhauled since and I can't find an instance of UnitManager.CanStartOperation there or anywhere else. I suspect it's CUI once again, but am at a loss to solve it.
 
Top Bottom