Cold Sweat

Cold Sweat

5M Downloads

Massive performance hit when calculating insulation temp

Senjosei opened this issue ยท 3 comments

commented

Im using this mod on the server playing with some friends when i notice the server crashes when someone wore an armor with chameleon insulation.
Full Log here

java.lang.Error: ServerHangWatchdog detected that a single server tick took 60.00 seconds (should be max 0.05)
	at com.momosoftworks.coldsweat.api.temperature.modifier.TempModifier.apply(TempModifier.java:80) ~[ColdSweat-2.4-b02a.jar%23257!/:2.4-b02a] {re:mixin,re:classloading}
	at com.momosoftworks.coldsweat.api.util.Temperature.apply(Temperature.java:126) ~[ColdSweat-2.4-b02a.jar%23257!/:2.4-b02a] {re:mixin,re:classloading}
	at com.momosoftworks.coldsweat.api.util.Temperature.apply(Temperature.java:146) ~[ColdSweat-2.4-b02a.jar%23257!/:2.4-b02a] {re:mixin,re:classloading}
	at com.momosoftworks.coldsweat.common.capability.temperature.AbstractTempCap.modifyFromAttribute(AbstractTempCap.java:291) ~[ColdSweat-2.4-b02a.jar%23257!/:2.4-b02a] {re:classloading}
	at com.momosoftworks.coldsweat.common.capability.temperature.AbstractTempCap.tick(AbstractTempCap.java:182) ~[ColdSweat-2.4-b02a.jar%23257!/:2.4-b02a] {re:classloading}
	at com.momosoftworks.coldsweat.common.capability.temperature.PlayerTempCap.tick(PlayerTempCap.java:26) ~[ColdSweat-2.4-b02a.jar%23257!/:2.4-b02a] {re:classloading}
	at com.momosoftworks.coldsweat.common.capability.handler.EntityTempManager.lambda$tickTemperature$11(EntityTempManager.java:210) ~[ColdSweat-2.4-b02a.jar%23257!/:2.4-b02a] {re:mixin,re:classloading}
	at com.momosoftworks.coldsweat.common.capability.handler.EntityTempManager$$Lambda$28491/0x000000080429bf30.accept(Unknown Source) ~[?:?] {}

Then i did an experiment to see the MSPT and every player wearing any armor with insulation adds 3 or 4ms to the MSPT

  • 1 Player on server -> 11ms
  • 2 Player on server -> 17ms
  • 2 player on server with 1 wearing full set armor with leather insulation -> 20ms
  • 2 player on server with 1 wearing full set armor with leather insulation -> 24ms

I dont know if its intended or not but that seems a bit more than supposed to, keep in mind this is in a world with multiple bases filled with a lot of create machines and that was with both of us in seperate dimension, when were close its only 12ms for 2 players with no insulation armor.

Im still trying to see if another mod is causing it but im positng this here first

commented

After some more testing, i downgraded to 2.4-b01a and the chameleon molt insulation crash issue dissappears so its def bcuz of 2.4-b02a. The MSPT effect on wearing armor is also reduced to 1 or 2 ms

commented

Can you run a Spark profiler to get a full view of what's causing the performance issues? I've talked to a couple people about similar issues, which I already have handled for the next version.

commented

i'll do a spark profile tomorrow since its 1am here. It might be some armor mixin (?) because in the ice and fire mod theres a mod called gorgon that turns you into stone and destroys your armor. When i was using the 2.4-b02a ver, when i got turned into stone the server experienced a massive lag spike and even the death is delayed by a couple mnts, now after downgrading to 2.4-b01a i died instantly and no more lag spike. (Both version was testing with full armor without any insulation on them)