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