WorldEdit

WorldEdit

43M Downloads

[Potential Bug] World Edit using a severe amount of RAM per blockstate

Barerock opened this issue ยท 1 comments

commented

WorldEdit Version

7.2.15

Platform Version

Forge 47.3.0

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

Additional Placements dev, FirEmerald, found through my memory leak bug report that in fact, World Edit is using an incredible amount of RAM per blockstate ingame. This causes extensively modded instances to require upwards of 16GB to load worlds, which is an unplayable amount because of GC lag. My own Heapdump reflected similar data to what FirEmerald found in their tests. They know a lot more technical info than I do about this issue, so perhaps they can provide more relevant and enlightening data.

AP adds more blockstates; however, World Edit seems to be at fault for the RAM bloat described in this report:
FirEmerald/AdditionalPlacements#96

Expected Behavior

I'm not sure. This may be an unfortunate side effect of World Edit's functions, in which case this is an unavoidable incompatibility with mods like Additional Placements that add extensive additional blockstates. This is only in the case of large modpacks exceeding 500+ extra blocks.

Reproduction Steps

  1. install a lot of mods with stairs and slabs, or a few mods with a lot of either. A compressed mod and config package is in linked report
  2. install World Edit
  3. install Additional Placements 2.0.5 -> 2.0.8 (unknown if 2.1.0 causes this yet, probably)
  4. attempt to create or load a pre-existing world with all of these mods
  5. fail
  6. allocate 10-16GB RAM to Minecraft instance
  7. try again until the world loads

Anything Else?

There are some interesting details about how this issue began, but I don't think they're entirely relevant to World Edit's RAM usage, only relevant to Additional Placements' functionality.

commented

this is not a bug nor a leak. it's also a duplicate. even if we were to optimize memory usage for mods that use 10x as many blockstates for a single block as minecraft uses for all blocks combined, we don't support or backport to old versions either.