WorldEdit for Bukkit

WorldEdit for Bukkit

21M Downloads

Large lagspike on server startup

znepb opened this issue ยท 0 comments

commented

WorldEdit Version

7.2.15

Platform Version

Fabric-Official(7.2.15+6463-5ca4dff)

Confirmations

  • I am using the most recent Minecraft release.
  • I am using a version of WorldEdit compatible with my Minecraft version.
  • I am using the latest or recommended version of my platform software.
  • I am NOT using a hybrid server, e.g. a server that combines Bukkit and Forge. Examples include Arclight, Mohist, and Cardboard.
  • I am NOT using a fork of WorldEdit, such as FastAsyncWorldEdit (FAWE) or AsyncWorldEdit (AWE)

Bug Description

On server startup, WorldEdit blocks the main thread for 17,140ms. This is likely caused by my server having some mods with large block/state counts (probably Consisteny+). However, it seems that WorldEdit caches all block state information on server startup on the main thread, causing a long time between the server saying it is ready to go and actually being ready to go.
Image
Image
Profiling via Spark

Expected Behavior

The server does not create a large lag spike on server startup.

Reproduction Steps

  1. Install Consistency+ on a dedicated server, or another mod with a large amount of blocks/block states
  2. Start the server
  3. Notice how long it takes between the server saying it is online, and it being available

Anything Else?

This could be easily fixed by running the block state collection on a secondary thread rather than the main thread.