We've had multiple people in the FAWE help channels wondering why their servers stop responding in the last weeks. It always came down to the Iris wand selection utility taking up too much time per tick. The bukkit scheduler doesn't care about that and just starts more threads each tick then. Over time, this results in thread starvation of other threads, as well as significantly higher memory pressure.
Most of this comes down to the time complexity of how the particle rendering works. Instead of looking at each block in the cuboid, we can simply only look at the blocks at edges. Additionally, we can filter out edges that are too far away from the player anyway.
A theoretical additional improvement would be reducing the edge length to what the player actually sees directly before iterating, but from my testing, this improvement is already enough.
We've had multiple people in the FAWE help channels wondering why their servers stop responding in the last weeks. It always came down to the Iris wand selection utility taking up too much time per tick. The bukkit scheduler doesn't care about that and just starts more threads each tick then. Over time, this results in thread starvation of other threads, as well as significantly higher memory pressure.
Most of this comes down to the time complexity of how the particle rendering works. Instead of looking at each block in the cuboid, we can simply only look at the blocks at edges. Additionally, we can filter out edges that are too far away from the player anyway.
A theoretical additional improvement would be reducing the edge length to what the player actually sees directly before iterating, but from my testing, this improvement is already enough.