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

Updating blocks creates lag spikes proportional to geometry in chunk section

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • Minecraft 17w50a, Minecraft 18w01a, Minecraft 18w07c, Minecraft 18w09a, Minecraft 18w11a, Minecraft 18w19b, Minecraft 1.13-pre1, Minecraft 1.13-pre5, Minecraft 1.13-pre6, Minecraft 1.13-pre7, Minecraft 1.13-pre8, Minecraft 1.13-pre9, Minecraft 1.13-pre10, Minecraft 1.13, Minecraft 18w30b, Minecraft 1.13.2, Minecraft 18w45a, Minecraft 18w48a, Minecraft 18w48b, Minecraft 18w49a, Minecraft 18w50a, Minecraft 19w04b, Minecraft 19w05a, Minecraft 19w06a, Minecraft 19w07a, Minecraft 19w08b, Minecraft 19w11b, Minecraft 19w12b, Minecraft 19w13b, Minecraft 19w14a, Minecraft 19w14b, Minecraft 1.14 Pre-Release 3, Minecraft 1.14 Pre-Release 5, Minecraft 1.14, Minecraft 1.14.1 Pre-Release 1, Minecraft 1.14.1, Minecraft 1.14.2 Pre-Release 2, Minecraft 1.14.2 Pre-Release 3, Minecraft 1.14.2, Minecraft 1.14.3 Pre-Release 2, Minecraft 1.14.3, 1.14.4, 19w37a, 19w39a, 19w40a, 19w41a, 19w42a, 19w45a, 1.15 Pre-release 1, 1.15 Pre-Release 2, 1.15 Pre-release 6, 1.15, 1.15.1, 1.15.2 Pre-release 2, 1.15.2, 20w07a, 20w15a, 20w18a, 1.16 Pre-release 2, 1.16 Pre-release 3, 1.16 Pre-release 4, 1.16 Pre-release 5, 1.16 Pre-release 7, 1.16.1, 20w27a, 20w28a, 20w29a, 20w30a, 1.16.2 Pre-release 1, 1.16.2 Release Candidate 2, 1.16.2, 1.16.3, 1.16.4 Pre-release 1, 20w46a, 20w49a, 20w51a, 21w03a, 1.16.5, 21w05b, 21w06a, 21w07a, 21w10a, 21w20a, 1.17, 1.17.1 Pre-release 1, 1.17.1 Release Candidate 2, 1.17.1, 21w39a, 21w43a, 1.18 Pre-release 2, 1.18 Release Candidate 1, 1.18 Release Candidate 3, 1.18.1, 22w06a, 22w15a, 1.19.1, 1.19.3, 1.19.4, 23w16a, 1.21
    • Confirmed
    • Block states, Performance, Rendering
    • Important
    • Platform

      The bug

      Any block change seems to trigger a redraw of the entire chunk section. This is most noticeable when breaking and replacing blocks, but is also caused by wheat growing, for example. Lag is increased depending on the geometry inside the chunk section – complex models like fences cause greater lag.

      This is client-side rendering issue since when filling large areas the command success message appears almost instantaneously in the log but the game freezes for some seconds.

      When the debug rendering pie chart is visible the following warnings are logged:

      [21:20:51] [Client thread/WARN]: Something's taking too long! 'root.gameRenderer.level.terrain_setup.rebuildNear.build near' took aprox 223.112349 ms
      [21:20:53] [Client thread/WARN]: Something's taking too long! 'root.gameRenderer.level.terrain_setup.rebuildNear.build near' took aprox 1796.166532 ms
      [21:20:53] [Client thread/WARN]: Something's taking too long! 'root.gameRenderer.level.terrain_setup.rebuildNear' took aprox 2046.063861 ms
      [21:20:53] [Client thread/WARN]: Something's taking too long! 'root.gameRenderer.level.terrain_setup' took aprox 2046.184909 ms
      [21:20:53] [Client thread/WARN]: Something's taking too long! 'root.gameRenderer.level' took aprox 2049.560368 ms
      [21:20:53] [Client thread/WARN]: Something's taking too long! 'root.gameRenderer' took aprox 2051.362563 ms
      [21:20:53] [Client thread/WARN]: Something's taking too long! 'root' took aprox 2054.692309 m
      

      How to reproduce

      1. Use the following command
        /fill ~1 ~1 ~1 ~15 ~15 ~15 oak_fence
        
      2. Place or break a block next to the filled fences

        1. 1.15.2 Vanilla MC-123584.png
          1.35 MB
          RedCMD
        2. 2019-08-09_21.25.44.png
          1.29 MB
          Oliver
        3. 2019-09-13_23.41.51.png
          1.20 MB
          whyFullname
        4. 2019-11-08_08.39.43.png
          707 kB
          RedCMD
        5. 2019-11-08_08.41.19.png
          694 kB
          RedCMD
        6. LaggSpike-BreakPlace-Blocks.png
          504 kB
          Nathan
        7. lag spikes .png
          1.60 MB
          Danny Kessler
        8. MC-lag_spike_.mp4
          673 kB
          Daminator4113
        9. Screenshot (930).png
          130 kB
          NOPEname
        10. Screenshot (931).png
          207 kB
          NOPEname
        11. Screenshot (932).png
          24 kB
          NOPEname

            Unassigned Unassigned
            marcono1234 Marcono1234
            Votes:
            546 Vote for this issue
            Watchers:
            177 Start watching this issue

              Created:
              Updated:
              CHK: