WorldEdit

WorldEdit

43M Downloads

Worldedit: WE 6.0+ causing massive lag on radius cmds

LadyCailinBot opened this issue ยท 6 comments

commented

WORLDEDIT-3241 - Reported by Kainzo

Just wanting to note that WorldEdit is causing massive lag on the latest versions.

[18:48:14 INFO]: WorldEdit version 6.0.0

Whenever I attempted to /butcher 5000 -- it lagged the server until it crashed, however on the version below, it completed the action in less than 1 second.

[18:48:14 INFO]: WorldEdit version 5.6.3

commented

Comment by PseudoKnight

5000 is enormous, for the record. It's freezing here:

Spigot Watchdog Thread/ERROR]: Current Thread: Server thread
PID: 16 | Suspended: false | Native: false | State: RUNNABLE
Stack:
	java.util.HashMap$TreeNode.find(Unknown Source)
	java.util.HashMap$TreeNode.find(Unknown Source)
	java.util.HashMap$TreeNode.find(Unknown Source)
	java.util.HashMap$TreeNode.find(Unknown Source)
	java.util.HashMap$TreeNode.putTreeVal(Unknown Source)
	java.util.HashMap.putVal(Unknown Source)
	java.util.HashMap.put(Unknown Source)
	java.util.HashSet.add(Unknown Source)
	com.sk89q.worldedit.regions.AbstractRegion.getChunks(AbstractRegion.java:176)
	com.sk89q.worldedit.bukkit.BukkitWorld.getEntities(BukkitWorld.java:91)
	com.sk89q.worldedit.extent.AbstractDelegateExtent.getEntities(AbstractDelegateExtent.java:94)```
commented

Comment by PseudoKnight

May I suggest a -w world flag?

commented

Comment by octylFractal

PseudoKnight: the world doesn't matter, it's the horrible performance of the HashSet along with the Vector2D. I'm looking in to speeding up the set creation.

commented

Comment by PseudoKnight

Right. A -w flag was an additional suggestion since you wouldn't have to fetch all the chunk vectors for no reason, players would know it applied to the whole world without having to use a ridiculous radius, and it could be run through console in theory. While the performance should be improved, an option to remove specified entities on an entire world would be more appropriate for Kainzo's case.

commented

Comment by sk89q

BukkitWorld.getEntities() is supposed to be a straight proxy to Bukkit's world.getEntities(), but I guess it's not implemented.

commented

Comment by octylFractal

sk89q, I can rewrite it but I also need to fix it for Forge.