Page 1 of 1

[0.17.32] High CRC update time in multiplayer

Posted: Fri Apr 19, 2019 2:05 am
by rlidwka
We're doing a custom pvp scenario on an unlimited map completely filled with biters and mineable-wreckage.

I'm trying to debug performance issues arising, among which there is something I couldn't figure out myself: CRC update time.
crc-snip.PNG
crc-snip.PNG (73.94 KiB) Viewed 1664 times
This time usage screenshot is made on 6 hour save (link to dropbox, 66MB), map has 25052 chunks generated. Each player is on a separate force, so there're couple dozen forces created. Removing biters and mineable-wreckage (via find_entities_filtered then destroy) had some effect (shrinking map size to 35MB), but crc time is still well above 10ms.

So, questions about CRC updates:
  1. What does it do exactly? What data is being hashed?
  2. Does it in our case take so long purely because of map size, or there's something else I missed?
  3. Is there a way to disable crc checks or make them more rare (e.g. every 10 ticks instead of every 1 tick)?

Re: [0.17.32] High CRC update time in multiplayer

Posted: Sat Apr 20, 2019 12:00 am
by Rseding91
Virtually all of the time spent calculating the CRC is going over the 3335 electric networks on the map and storing a few bytes about how much power has been used from each in the CRC.

As for why there are 3335 electric networks: you've created loads of single electric poles all around the map that have nothing connected to them - but that makes an electric network.

Remove all of those random electric poles and the CRC time will drop.