Large lagspike on server startup
znepb opened this issue ยท 0 comments
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.
Profiling via Spark
Expected Behavior
The server does not create a large lag spike on server startup.
Reproduction Steps
- Install Consistency+ on a dedicated server, or another mod with a large amount of blocks/block states
- Start the server
- 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.