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

Drowned navigation causes memory leak/performance degredation

XMLWordPrintable

    • Community Consensus
    • Performance
    • Important

      When a drowned entity is loaded the default navigation (the one created by Mob::createNavigation) is added to ServerLevel::navigations because Drowned::updateSwimming was not executed yet.

      But when it's unloaded the one returned by Mob::getNavigation() is removed from ServerLevel::navigations, which by that point is either Drowned::waterNavigation or Drowned::groundNavigation.

      This causes a memory leak because the navigation added to the Set is not one of those two and thus not ever removed. As a result Level::setBlock performance degrades.

      For reference our server accumulated approximately 8,100 navigations in the Set with only 38 drowned actually being alive in approximately 26h.

            Unassigned Unassigned
            skyrising skyrising (Simon Wanner)
            Votes:
            19 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: