Mojira Archive
MC-174568

Rail updates are 3-4x times laggier since 1.13

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

Fixed

RedCMD

[Mojang] Billy Sjöberg

2020-03-12, 03:12 AM

2020-05-07, 05:40 AM

2020-05-06, 06:27 PM

33

15

Plausible

Very Important

Performance

mojang_internal_1

1.15.2, 20w11a, 20w12a, 20w17a

20w19a