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

Rail updates are 3-4x times laggier since 1.13

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 20w19a
    • 1.15.2, 20w11a, 20w12a, 20w17a
    • Plausible
    • Performance
    • Very Important

      Powering and depowering rails are 3 to 4 times laggier since 1.13+ than 1.12.2-

      "The primary bottleneck lies in shape comparison which is performed to determine whether the block beneath the rail is solid on top and can support it." - JellySquid

      1.12.2- used a simple boolean check while 1.13+ recalculates the hitbox of the block below the rail every time

      Below are some testing results
      I have a void world with 10,000 rails running on a 2gt observer clock
      5000 rails update every gametick (half turning on, half turning off)
      16 chunk render distance
      4gb of ram for the jvm
      The world ran at less than half an mspt when idle which was consistent across all versions
      Each test was done a few times to remove outliers

       

      Version Variant TPS MSPT Thumbnail
      1.11.2 Vanilla 16.96    58.9
      1.12.2 Vanilla 16.26    62
      1.13.0 Vanilla   5.39  185
      1.13.1 Vanilla 13.19    76
      1.13.2 Vanilla 12.63    79
      1.14.4 Vanilla   4.61  216
      1.15.2 Vanilla   4.59  213
      20w10a Vanilla   5  200
      20w11a Vanilla   4.19  228
      1.15.2 Lithium 16.7    60
      20w10a Lithium 20    50
      20w11a Lithium 19.3    52
      20w18a Vanilla   5  197
      20w19a Vanilla 20    50

      Lithium heavily optimizes the shape comparison check (It does not revert the code back to 1.12) and adds block ticking optimizations
      World Download: Rail Update Lag 1.12.zip

        1. 1.11.2 Vanilla 16.96tps 58.9ms.png
          521 kB
          RedCMD
        2. 1.12.2 Vanilla 16.26tps 61ms.png
          588 kB
          RedCMD
        3. 1.13.0 Vanilla 5.39tps 185ms.png
          747 kB
          RedCMD
        4. 1.13.1 Vanilla 13.19tps 75.81ms.png
          804 kB
          RedCMD
        5. 1.13.2 Vanilla 12.63tps 79ms.png
          794 kB
          RedCMD
        6. 1.14.4 Vanilla 4.61tps 216ms.png
          580 kB
          RedCMD
        7. 1.15.2 Lithium 16.7tps 60ms.png
          766 kB
          RedCMD
        8. 1.15.2 Vanilla 4.59tps 213ms.png
          475 kB
          RedCMD
        9. 20w10a Lithium 20tps 50ms.png
          723 kB
          RedCMD
        10. 20w10a Vanilla 5tps 200ms.png
          619 kB
          RedCMD
        11. 20w11a Lithium 19.3tps 52ms.png
          728 kB
          RedCMD
        12. 20w11a Vanilla 4.19tps 228ms.png
          583 kB
          RedCMD
        13. 20w18a Vanilla 5tps 198ms.png
          601 kB
          RedCMD
        14. 20w19a Vanilla 20tps 50ms.png
          709 kB
          RedCMD
        15. image.png
          766 kB
          Jasper Buijs

            billy.sjoberg [Mojang] Billy Sjöberg
            RedCMD RedCMD
            Votes:
            33 Vote for this issue
            Watchers:
            15 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: