Page 1 of 1

[0.12.30] [Rseding91] Stacks of Armors in chests causes lag

Posted: Thu Apr 21, 2016 9:32 am
by Supercheese
When you have multiple chests full of Armor-type items, the game begins to lag noticeably.

Steps to reproduce:
  • Load any save (tested both vanilla and modded) where you have several chests
  • Activate the debug "show_time_used_percent" option and make a baseline measurement for comparison, paying special attention to the "Electric network" portion
  • Either insert a bunch of armor-type items into the chests manually, or use a command like

    Code: Select all

    /c game.local_player.selected.insert{name="heavy-armor", count = 1000}
  • Do this for multiple chests, and check the Electric network time_used_percent again. It should have increased dramatically
Evidently something behind the scenes is flipping out when multiple stacks of armors are stored in chests. I tested with basic armor, heavy armor, and power armor, and they all caused lag.

Some illustrative screenshots -- note the "Electric network" numbers at bottom left increasing dramatically:
Baseline
Uh oh this is getting bad
Jeez what is going on here
Note that while I still maintained 60 UPS through this particular test, in some of my saved games the Electric network time_used_percent has reached as high as 21, which slowed me down to ~20 UPS and effectively killed performance.

Re: [0.12.30] Stacks of Armors in chests causes lag

Posted: Thu Apr 21, 2016 3:42 pm
by Klonan
Thanks for the report,

This will be fixed/optimized in 0.13
As large parts of the electric network code have changed