Async World Edit feature wish list

Discussion in 'Programming' started by SB_prime, Jun 9, 2015.

  1. Please put all the suggestions for features/changes you would like to see in AsyncWorldEdit.

    Rules:
    • Put only suggestions for changes/new features
    • Each suggestion must contain: Title, Short description.
    • Each feature/update must be a single feature (Add X message and allow disabling of message Y should be put in 2 posts)
    • Do not double post
    • If you like/dislike a feature please post its Title and +1/-1
    You can also put your suggestions on GitHub:
    https://github.com/SBPrime/AsyncWorldEdit/issues/104
     
    #1 SB_prime, Jun 9, 2015
    Last edited: Jun 9, 2015
  2. Title: Fast Schematic Loader - Pasting large schematics

    I think I might have an interesting addition/feature for AsyncWorldEdit, which speeds up the schematic loading.

    Here is the result (Note: it's just about the first 15 seconds, the rest is just to prove schematic is huge)

    The schematic is about 2MB +- 72 million blocks (including air)

    Facts & Numbers:
    - WorldEdit maps every block on load up VS mapping on the fly
    - WorldEdit re-maps all blocks on rotation VS a variable is set to the direction on rotation
    - WorldEdit load-up 13-20 sec VS +-1 second load-up

    In short
    removed 2 loops (load-up + rotate) which were performed over all blocks of the schematic and created something to handle the placing.

    The way blocks are placed (like in the video, 'chunk-like') is done one the fly (without performing some kind of sorting) and has a complexity of O(n). I have not figured out yet if the lag has decreased because of this, or because it decreases the chance of placing stuff like torches etc on mass. I'm still experimenting it, but noticed that the blocks causing lag are either Attachable, Directional or something with light. These all perform extra operations on place.

    Anyway, please let me know what you think and if you are interested.
    I might be able to extract it from my plugin and offer it as LIB :)

    EDIT: Noticed that the schematic loader uses less RAM then the additional one, because less objects are created (each at least 16 bytes, which adds up if you have 72Million of them).
    Gonna try convincing WorldEdit, as both WE and AWE users should benefit eventually if it gets implemented there.
     
    #2 Chingo247, Jun 9, 2015
    Last edited: Jun 20, 2015
    • Like Like x 2
  3. @Chingo247 Title: Fast Schematic Loader - Pasting large schematics
    So you would like AWE to handle the schematics load/paste directly without WorldEdit? If so this looks more like an additional feature to WE but It could get onto the feature list if ppl like it.
     
    • Like Like x 2
  4. saphiria

    Artist

    Title: Fast Schematic Loader - Pasting large schematics

    +1
     
  5. It crossed my mind, schematics would load faster, but with plain WorldEdit you would probably be unable to place it (assumption!). Which brought me here. However, I could be horribly underestimating WorldEdit

    EDIT: Noticed that the schematic loader uses about RAM then the additional one, because less objects are created (each at least 16 bytes, which adds up if you have 72Million of them).
    Gonna try convincing WorldEdit, as both WE and AWE users should benefit eventually if it gets implemented there.
     
    #5 Chingo247, Jun 9, 2015
    Last edited: Jun 20, 2015
  6. Use Bukkit's event system for JobStateChangedEvent.
     
    #6 aaomidi, Jun 18, 2015
    Last edited: Jun 18, 2015
  7. There is already a way to listen to the state of the jobs. You could you could implement the IBlockPlacerListener interface and then register it to the blockplacer. Within the OnJobAdded() (of the IBlockPlacerListener) you could register a JobEntryListener to the job, which could tell you the state of the job (Placing blocks, etc). The onJobRemoved() (of the IBlockPlacerListener) is executed when a job has been finished or was canceled.

    EDIT:
    Although mentioned all above, it would be easier for developers if a Event-Framework was used.
    At the moment I'm using the Guava EventBus (which is embedded into WorldEdit). I do something like above described and fire the events myself.
     
    #7 Chingo247, Jun 18, 2015
    Last edited: Jun 19, 2015