Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-185263

Non full chunks in cache memory "semi-leak"

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: 1.15.2, 1.16.2, 1.16.3, 1.16.4 Pre-release 1, 20w46a, 20w49a
    • Fix Version/s: None
    • Labels:
      None
    • Confirmation Status:
      Plausible
    • Category:
      Performance

      Description

      See patch: https://github.com/PaperMC/Paper/commit/cf82dad399cf3bfb6b4cdd54f264d4563633940e

       

      For any full status chunk on disk that is loaded, a lambda is created in loadChunks to load the Entity data from the NBT once it reaches full.

       

      This lambda is holding a reference to every variable in this functions scope, including the full chunks NBT compound...

      So for every chunk we load into the cache but never reach full status, this scope is leaked and holds a lot of memory.

      The Lambda needs to be created outside of the functions scope, as well as make a new NBT Tag compound and copy the Entities and TileEntities sections to it, so the only NBT that is "held" in a non full status is those 2 NBTTagList's.

      Or ideally, extract the NBT state out at this point of time in a safe way so no NBTTagCompound's have to linger.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              aikar Aikar
              Votes:
              14 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                CHK: