TurtlePlaceCommand causing latency issues with FakePlayer creation
bloodmc opened this issue ยท 4 comments
TurtlePlaceCommand seems to be generating new FakePlayer's every time it is run. This is causing latency issues as shown below. This should be cached because it's not a good idea to generate new players every time this updates.
net.minecraft.world.WorldServer.updateTileEntity()40.38%
org.spongepowered.common.event.tracking.TrackingUtil.tickTileEntity()40.26%
dan200.computercraft.shared.turtle.blocks.TileTurtle.update()14.16%
dan200.computercraft.shared.turtle.core.TurtleBrain.update()12.72%
dan200.computercraft.shared.turtle.core.TurtleBrain.updateCommands()12.25%
dan200.computercraft.shared.turtle.core.TurtleSuckCommand.execute()10.52%
dan200.computercraft.shared.turtle.core.TurtlePlaceCommand.createPlayer()10.29%
dan200.computercraft.shared.turtle.core.TurtlePlayer.<init>()10.29%
net.minecraftforge.common.util.FakePlayer.<init>()10.29%
net.minecraft.entity.player.EntityPlayerMP.<init>()10.29%
net.minecraft.server.management.PlayerList.func_192054_h()9.92%
net.minecraft.advancements.PlayerAdvancements.<init>()9.92%
net.minecraft.advancements.PlayerAdvancements.func_192740_f()9.92%
net.minecraft.advancements.PlayerAdvancements.func_192752_d()8.92%
net.minecraft.advancements.PlayerAdvancements.func_192742_b()8.76%
I see you do cache here
So this may not be an issue after all =)
I'm going to see why FakePlayer's are initializing advancements as well.