[1.18.2] Performance hit from Sticky Webs
Reshy opened this issue ยท 2 comments
Spiders seem to get caught in the sticky webs and are applied with the slow effect and attempt to avoid said sticky webs despite it covering most services. This turns the TPS from about 20ms to something about 80ms.
Look again at your log. This isn't a Bumblezone issue. I tested a world with a ton of spiders in Honey Web and Stick Honey Residue in 1.19.2 and TPS is fine.
The log shows that the issue is when the effect is applied, Cyclic is literally checking blocks in the world constantly which is very questionable imo. this is some sort of thing to block the effects of a Beacon, they should probably use a mixin into beacon code because running a scan for the beacon every time an effect is added sounds like a great way to kill TPS and is incredibly inefficient. This is a thing where mixins are much better suited than events when it comes to squeezing the best performance possible and target a very specific use case instead of running for all scenerios.
net.minecraftforge.eventbus.ASMEventHandler_2960_PotionEvents_isPotionApplicable_PotionApplicableEvent.invoke()55.44%
com.lothrazar.cyclic.event.PotionEvents.isPotionApplicable()55.44%
com.lothrazar.cyclic.block.antipotion.BlockAntiBeacon.isPotionApplicable()55.44%
com.lothrazar.cyclic.util.BlockstatesUtil.findBlocks()55.44%
net.minecraft.world.level.Level.getBlockState()55.44%
TPS under 20 despite me spamming a ton of the spiders in the sticky blocks