Redstone dust causes immense amounts of lag on servers (including local SinglePlayer "servers"), and here's why (deduced from the game code, as well as a mod I wrote to help track down some redstone querks):
Except for a redstone dust block updating (at least) 23 blocks around it, every time it is placed or receives any sort of update, apparently, redstone dust also DOES NOT directly de-power, as you'd expect. Instead, it continually loses 1 signal strength until it's "satisfied" and a check fails, meaning it doesn't need to update anymore. The 15 signal strength levels it needs to lose (one-by-one, mind you), each time causing at least 23 block updates, all happening within 1 gametick (1/20th of a second, around 15 * 23 = 345 block updates in total) cause a lot of unnecessary calculations to be done. Not only that, but this example only involved one piece of redstone dust. Imagine the same happening with a line, or even a grid. There it's even worse, since the dust blocks update each other again and again multiple times in 1 single game tick, so that a line of 15 redstone dust can easily amount to around 2,500 block updates in total.
Each calculation is independently quite quick and simple, but any calculation run 2,500+ times in a 1/20th of second, where a lot of other calculations also need to run in that short time frame, is heavy, to say the least.
I suggest rewriting the redstone dust update code, as it is quite simple and will reduce a whole load of lag on any server with redstone clocks running.
Redstone dust is a horrible lag causer, and it does so in one of the most unnecessary ways in the entire game.
Here is a short clip demonstrating (using my mod, as mentioned above) how 1 piece of redstone dust alone causes 15 * 23 = 345 block updates when de-powering:
https://www.youtube.com/watch?v=T3bST3JGgas
Final note: The "Affected Version/s" field only allows set versions, and only the most recent ones, however, this "bug" has existed ever since redstone dust was added to the game, all the way back in Alpha 1.0.1.
Possible solutions
Linked issues
is duplicated by 10
relates to 2
Attachments
Comments 42
@Sonic I disagree. He is talking about lag, not knowing what causes it, as well as talking specifically about 1.7 worlds running in 1.8 servers. I am talking about (pretty much) all versions of Minecraft, while also providing proof and a thorough explanation of the phenomenon.
Is any of this a "feature" to Redstone designers that would have to be considered before rewriting the implementation? (The performance savings sounds worthwhile regardless. I'm just curious.) For example, if two things on the same circuit are at power-13 and power-12, will the power-12 one always depower first, and does that ever matter?
I read your note about the affected versions but you should still specify it as all the versions it allows you to select.
@@unknown as of this moment you can only select the current version 1.8.7, so he has selected everything he can.
Dupe of MC-76561