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

Profiler doesn't exit section when an entity is removed, causing recursive profiling and lag

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Minecraft 18w31a
    • Minecraft 18w30b
    • Windows 10

      built-in java version

      Intel i7 7700K

      Nvidia GTX GeForce 1080
    • Confirmed

      extreme lag occurs in newly created world, and when opening the debug pie, you can dive infinitely in "root.root.tick.root.root.root.tick.level.root.root.root.root.tick.root" (chose always "root", or if there is no "root", then chose "tick")

      you have to wait a little before "root" is showing up on the debug pie, the more you wait, the more you can dive into infinite root

      This specifically happens when an entity is removed; with spawning disabled it will only get deeper if you manually create and kill an entity. However, in normal situations, entities are spawning and being removed all the time, causing it to constantly get deeper. This is specifically from the new code used to tick entities; when it returns false it fails to end the profiler section.
       

      when debug is started you can see insanely long messages like

      Something's taking too long! 'root.tick.level.entities.regular.remove.remove.root.tick.level.entities.regular.remove.remove.remove.remove.remove.remove.remove.remove.root.tick.level.entities.regular.remove.remove.remove.remove.root.tick.level.entities.regular.remove.root.tick.level.entities.root.root.root.root.root.root.root.root.tick.level.entities.regular.remove.remove.remove.remove.root.tick.root.tick.root.tick.level.entities.regular.root.root.tick.root.root.tick.level.entities.regular.remove.remove.root.tick.level.entities.regular.remove.remove.remove.root.root.tick.root.root.root.root.root.root.tick.level.entities.root.tick.root.root.tick.level.entities.regular.remove.remove.remove.remove.remove.remove.remove.root.tick.level.entities.regular.remove.remove.remove.remove.remove.remove.remove.remove.remove.remove.remove.remove.remove.remove.remove.remove.remove.root.tick.level.entities.regular.remove.remove.remove.remove.remove.remove.remove.remove.remove.remove.remove.remove.remove.remove.remove.remove.remove.remove.root.tick.level.entities.regular.remove.remove.remove.remove.remove.remove.remove.root.root.tick.level.entities.regular.remove.remove.remove.remove.remove.remove.root.tick.level.entities.regular.remove.remove.remove.remove.remove.remove.root.tick.level.entities.regular.remove.remove.remove.remove.remove.remove.root.tick.level.entities.regular.remove.remove.remove.root.tick.root.tick.level.entities.regular.remove.remove.remove.remove.remove.remove.remove.root.tick.root.tick.level.entities.regular.remove.remove.remove.remove.remove.remove.remove.remove.remove.root.tick.level.entities.regular.remove.remove.root.tick.level.entities.regular.remove.remove.remove.remove.remove.root.tick.level.entities.regular.remove.remove.remove.remove.remove.remove.remove.remove.remove.remove.remove.root.gameRenderer.gui.debug' took aprox 686.731299 ms

       

      after testing, it seems to happen only when debug screen is active, and closing debug screen stop all lags

            Unassigned Unassigned
            Tralomine Tralomine
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: