The good ol WorldEdit lag

Discussion in 'Server & Community Management' started by kyle, Apr 3, 2013.

  1. I posted this on bukkit forums with no luck... -_-
    Maybe the spigot community is willing to help and maybe even make a good sum of real money *hint*hint
    I allow all players on my server to use the popular plugin WorldEdit yet I always run into the same problem. With allowing all the players to set up to 4000 blocks is no problem, I have installed certain plugins to make sure that commands are allowed to be used every 3 seconds. The main problem is I had 150 players on this weekend and if lets say 5 people issue //set stone at the same time that's up to 20,000 that need to be changed. This can stack up to 15 players at once which is 60,000 blocks that need to be changed...
    This may seem to not be a problem on smaller servers but holding 150 players can limit the abilities of what I can afford.

    What I want: Make all WorldEdit operations like this

    Blocks

    The block property determines how many blocks are placed in each run. The default value is 1000. If this value is higher all the drawing will by done faster. But if this value is to high you can experience TPS drop and server lag. This is due to the fact that the server main thread is locked by the renderer (you can experience a similar effect when editing large areas with WorldEdit). The only downside of lowering this value is that the drawing will take longer.
    Example

    For example one operation requires 1300 blocks. Using the default settings it takes 1s to render it. If you lower the blocksvalue to 100 it will take 12s. This will eliminate all the server side lags but as you can see drastically increases the time needed to draw a statue. A good value for blocks is in range of 500 - 1000.
    I strongly discourage you to lower the interval property. Although lowering the value of interval and blocks can lower server lag and keep the drawing time short it causes more chunk updates. When interval was set to 5 and blocks to 100 it almost always caused the client to crash (the server had no lag).
    In all examples I assumed that only one player is drawing statues. If more players use the plugin at the same time the time needed to draw statues increases proportionally to the number of players.

    Also, skim-reading is much easier with paragraphs!

    Ideas for commands: No commands needed for this plugin.

    Ideas for permissions:

    pluginname.worldeditlimit
    - modify the worldedit limit for player
     
    • Like Like x 1
  2. joehot200

    Supporter

    Please explain more, i do not 100% understand.
     
  3. Darn I thought I did a good job explaining :(
    Look at this plugin mcpainter
    It places 1000 blocks at a time when pasting a statue or image
     
  4. He wants WE operations to be done in batches, I.E. every second the server processes 1000 blocks, if 5000 blocks were supposed to be changed, it would be done over 5 seconds.
     
  5. Thanks IDK why I did not think of it that way :p
     
  6. joehot200

    Supporter

    Oooooooohhhh...
    Wouldent it be simpler to use multiple threads as well? Like CoreProtect?

    Edit: Well its 1 in the morning here, got to go to bed, sorry, ill continue the convo tomorrow
     
  7. I believe so...

    I don't know if WE even has an API to do this, would be a great addition to the plugin itself though, every once in awhile I need to copy-paste huge amounts of blocks, and manually doing it in parts is annoying.
     
  8. I think it does looking back at my example mcpainter somehow does this using the worldedit api
     
  9. I believe they achieve this by sending WE the blocks to change in chunks (Kind of like instead of setting 2000 blocks with one command, they sent the command 4 times doing 500 blocks at a time) This is just assumption, maybe there really is a hook in the WE API, I don't know.
     
  10. That might work are you willing/able to make it because then I can allow more than just 110 people on my srever ;)
     
  11. I would be happy to if I programmed in Java :p
     
  12. :mad::mad::mad::mad::mad::mad::mad::mad::mad::mad::mad::mad::mad::mad::mad::mad::mad::mad::mad::mad::mad::mad::mad::mad::mad::mad::mad::mad::mad::mad::mad::mad::mad::mad::mad::mad::mad::mad:
     
  13. Puremin0rez

    Moderator

    My biggest complaint is that WorldEdit does everything "right" away.

    Splitting it up into chunks would be much better.
     
    • Agree Agree x 3
  14. That would be awesome.

    However, but not everything at once. :eek:
     
  15. Thats why i removed world edit from my admins cause they would normally crash the server when trying to do big builds.
     
    • Agree Agree x 1
  16. Now... Just need a person to make it :D
     
  17. You have to use the main thread if you want to change blocks on a Minecraft server and for what does CoreProtect use other threads for? (Only reasonable option would be to let the sql stuff sending and receiving data in another thread).

    @kyle Did you ask the WorldEdit author already?
     
  18. He did not reply so I went to bukkit they didn't reply so I went here
     
  19. Did you ask over PM? They are usually quite active in the IRC chat.
     
  20. Nwmp I'll try