☑ FastAsyncWorldEdit

If you make a WorldEdit, I’d like to see a survival compatible mode which uses blocks from your inventory…

2 Likes

Oh jeez, more user servicing.

Maybe. We’ll see.

Okay, here’s how it went:

  • Loaded up FAWE with SV 297, increased the number of parallel threads to 4
  • Tweaked some settings like queue target etc so it’s optimized for speed rather than low memory
  • Set 50 mil blocks with fastmode, took 0.36 seconds, that’s almost 140M bps
  • Stopped the server, deleted FAWE and restarted (just running WorldEdit-sponge now)
  • Decided to do a 1 mil block edit, which if 250x slower would take 1.8 seconds -> server crashes
  • Tried changing just a single chunk, it took 10 seconds
  • What’s that, 6554 bps? Okay, FAWE is 2 million percent faster. I wasn’t expecting that.

I now have serious doubts about any substantial block changes being done through the sponge api.

As for plugins having a say in the matter, it’d really only be useful for creative, and actually it wouldn’t because it’s crazy slow. There’s already a hook for PlotSquared, I’m sure anyone wanting to could hook into WorldEdit and use the EditSession event to cancel changes.

1 Like

Oh my god FAWE stop playing God.

You know, we have an API specifically for large block changes that WorldEdit is still not taking advantage of, right?

That kinda defeats the purpose of having a couple if not a few event listeners to simply cancel for players interacting in a specific area, because now people have to figure out how to use FAWE as a dependency and/or WorldEdit as a dependency. There are seriously better ways to do most all of this than what you’re trying to pass as “acceptable”.

3 Likes

In my opinion, it’s not my job to hook into your plugin to provide support for it (unless it’s a votifier type thing, where that’s the point) if it just does run-of-the-mill stuff that should be done through the API…

1 Like

Gabi what is this API you speak of?

https://github.com/SpongePowered/SpongeAPI/tree/master/src/main/java/org/spongepowered/api/world/extent/worker

BlockVolumeWorker API?

It’s been available for a while now. Hell, even with placing entities/tile entities, you can do a lot more in various phases. And trust me when I say this, VoxelSniper performs massive block changes in several passes while using the very same method I’ve been talking about.

2 Likes

FAWE v3.4.3 update

Block changes are now done through the Sponge API if admin bypass is not enabled for the user
The majority of WorldEdit messages are now translatable through FAWE
Added heightmap brush (supports using png as heightmap)
Removed some startup messages
Added more info on injection failure
Fixed gravity brush
Fixed NPE for entity spawns with lazycopy / other copy issues
Fixed chest/furnace/redstone/banner torch orientation
Fixed potential navigation issue
Fixed fixliquid
Fixed some packet sending issues
Various optimizations

Download

https://github.com/boy0001/FastAsyncWorldedit/releases

3 Likes

I’m really interested in seeing something to back up these claims.

You mentioned that this doesn’t store NBT data for all blocks to save on memory. WorldEdit doesn’t either.

1 Like

No you’re not. If you were actually interested you wouldn’t have been mocking this in IRC.

Regardless, if you feel like testing the performance claim yourself, you can use the following settings:

I was able to get up to 140,000,000 bps.

  • WorldEdit stores NBT for empty chests / empty signs etc in the ChangeSetExtent
  • The memory improvements FAWE has from this is negligable, I just thought to mention it
  • Most of the improvement is from not doing the reordering, dispatching during processing, using a compressed byte array for the changes, and allowing the disk to be used as storage.
2 Likes

its not mocking, it’s more a lack of belief that it’s actually possible to safely achieve what this is claiming to achieve.

Half the things you just mentioned removing, such as the reordering, are actually quite important to ensuring that regions are copied as they should be. If they weren’t important they wouldn’t be done.

Whilst I agree there are a lot of places that WorldEdit could be improved, some of which you’ve done, some of these changes cause more harm than they fix.

Also, I’d be interested to see in a benchmark of CPU time if checking for empty NBT data in signs/chests is as fast as just copying all. In servers CPU efficiency is almost always more important than memory efficiency.

3 Likes

“Let’s butcher the internals of the game and hope that blocks work”

There’s a difference between being skeptical and mocking, I agree. To me it felt a lot more like the latter.

With “half the things” being one thing, I know exactly why the reordering is done; to compensate for another issue. WorldEdit performs physics (and relighting / packet sending) on each block after it’s placed, meaning if a torch is changed first it’ll pop off right away. Same with signs and plants etc. FAWE modifies the chunk object directly so there’s no risk of blocks breaking immediately. FAWE also does the relighting and packets after the whole chunk has been placed, which can be made a lot more efficient.

I can spare you the benchmark and tell you it’s slower, though I’m already checking sign NBT since pasting schematics can kick the client (and no, wizjany’s fix doesn’t fix that). Usually an edit won’t paste more than 20 or so tile entities, so it’s pretty insignificant either way.

I have to disagree with CPU efficiency being paramount at this point. WorldEdit is notorious for running out of memory and crashing the server. After my performance improvements, it can afford to do expensive things like check nbt, on the fly compression, streaming changes to disk; and still be much faster.

3 Likes

Can someone explain what is going on with this?

I run a command; fawe says it completed it; but if looks like this; ontop of that it unloads all surrounding chunks so I’m unable to do anything else without restarting the client and by doing that It corrupts the chunk to looking like this and i havent found a way to fix them…

I think regen is broken with sponge.

same thing happens with /undo

Does regening area’s usually work for super flat worlds without sponge?

So yeah… Breaks my WE completly
11.05 16:51:12 [Server] Server thread/INFO [io.github.hsyyid.essentialcmds]: [MrDaNiNeX] executed command /copy
11.05 16:51:12 [Server] INFO May 11, 2016 4:51:12 PM com.sk89q.worldedit.extension.platform.CommandManager$1 run
11.05 16:51:12 [Server] INFO SEVERE: [WorldEdit] An unexpected error while handling a WorldEdit command
11.05 16:51:12 [Server] INFO java.lang.reflect.InvocationTargetException
11.05 16:51:12 [Server] INFO at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
11.05 16:51:12 [Server] INFO at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
11.05 16:51:12 [Server] INFO at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
11.05 16:51:12 [Server] INFO at java.lang.reflect.Method.invoke(Method.java:498)
11.05 16:51:12 [Server] INFO at com.sk89q.worldedit.util.command.parametric.ParametricCallable.call(ParametricCallable.java:243)
11.05 16:51:12 [Server] INFO at com.sk89q.worldedit.util.command.SimpleDispatcher.call(SimpleDispatcher.java:125)
11.05 16:51:12 [Server] INFO at com.sk89q.worldedit.extension.platform.CommandManager$1.run(CommandManager.java:253)
11.05 16:51:12 [Server] INFO at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
11.05 16:51:12 [Server] INFO at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
11.05 16:51:12 [Server] INFO at java.lang.Thread.run(Thread.java:745)
11.05 16:51:12 [Server] INFO Caused by: java.lang.ClassCastException: net.minecraft.world.chunk.Chunk cannot be cast to [C
11.05 16:51:12 [Server] INFO at com.boydti.fawe.forge.v0.ForgeQueue_All.getCombinedId4Data(ForgeQueue_All.java:31)
11.05 16:51:12 [Server] INFO at com.boydti.fawe.example.MappedFaweQueue.getCombinedId4Data(MappedFaweQueue.java:281)
11.05 16:51:12 [Server] INFO at com.boydti.fawe.util.FaweQueue.getCombinedId4DataDebug(FaweQueue.java:105)
11.05 16:51:12 [Server] INFO at com.sk89q.worldedit.EditSession.getLazyBlock(EditSession.java:631)
11.05 16:51:12 [Server] INFO at com.sk89q.worldedit.EditSession.getLazyBlock(EditSession.java:624)
11.05 16:51:12 [Server] INFO at com.sk89q.worldedit.EditSession.getBlock(EditSession.java:646)
11.05 16:51:12 [Server] INFO at com.sk89q.worldedit.function.block.ExtentBlockCopy.apply(ExtentBlockCopy.java:66)
11.05 16:51:12 [Server] INFO at com.sk89q.worldedit.function.RegionMaskingFilter.apply(RegionMaskingFilter.java:53)
11.05 16:51:12 [Server] INFO at com.sk89q.worldedit.function.visitor.RegionVisitor.resume(RegionVisitor.java:58)
11.05 16:51:12 [Server] INFO at com.sk89q.worldedit.function.operation.OperationQueue.resume(OperationQueue.java:89)
11.05 16:51:12 [Server] INFO at com.sk89q.worldedit.function.operation.DelegateOperation.resume(DelegateOperation.java:52)
11.05 16:51:12 [Server] INFO at com.sk89q.worldedit.function.operation.Operations.completeBlindly(Operations.java:69)
11.05 16:51:12 [Server] INFO at com.sk89q.worldedit.function.operation.Operations.completeLegacy(Operations.java:56)
11.05 16:51:12 [Server] INFO at com.sk89q.worldedit.command.ClipboardCommands.copy(ClipboardCommands.java:169)
11.05 16:51:12 [Server] INFO … 10 more

1 Like

Same with mine. Can’t even pull out W.E wand without it throwing an internal exception