Even basic redstone contraptions are causing severe lag and framerate drops. I typically get well over 100 FPS (redstone_clock_disabled.png). To duplicate, I created a simple redstone clock that toggles a number of redstone torches and dust. While active (redstone_clock_enabled.png), this causes my framerate to drop to about 25 FPS (using the bundled javaw.exe 1.8.0_25 my framerate drops to 5 FPS).
I think this may be a lighting issue, however. I tested a redstone contraption that does not create lighting updates with a piston and rapidly flipping the lever causes no lag. If I add a redstone lamp, the lag spikes return (redstone_lamp.gif). Ninja Edit: I also get a lag spike when placing and item in a furnace and it fires up.
This may be related to the issue reported here: MC-124086 which I believe has been erroneously marked DUPLICATE, as this bug is not present in Minecraft version 1.12.0.
Linked issues
duplicates 1
is duplicated by 5
relates to 2
Attachments
Comments 30
I can confirm that lighting causes lag spikes in 18w15a.
I couldn't tell from testing whether this is client side or server side (or a little of both).
That .gif makes it pretty clear that there's an issue 🙂
This sounds like it could be a variant of MC-1692. Are you sure that this doesn't happen in 1.12.2?
No, it doesn't happen in 1.12.2. I actually went back to 1.12.2 because this bug makes playing with redstone contraptions unbearable.
The lag depends on the distance to the redstone circuit: If you go ~37 blocks away (Mipmap level 4) the lag spikes disappear entirely. See the attached screenshots:
1 - Inactive - Close shows a simple (incomplete) redstone clock
[media]2 - Active - Close shows the completed redstone clock causing FPS drops
[media]3 - Active - Near shows the lag getting worse 6 blocks away
[media]4 - Active - Far shows about the same lag 35 blocks away.
[media]5 - Active - Better shows the lag getting better at 36 blocks away.
[media]6 - Active - OK shows the lag completely gone at 37 blocks away.
[media]
I was unable to reproduce the issue in an empty super flat world (Redstone Friendly preset), leading me to do testing in different environments:
The lag incurred seems to depend on the surroundings. The same circuit produces a lot more lag in a forest than on a plain mountain side for instance.
[media][media]
I tried building the same circuit in a Roofed Forest and experienced massive lag. Setting my video settings to fast graphics reduced this considerably although it was still very noticeable. Here are screenshots with fancy vs fast graphics setting:
[media][media]The biome blend distance setting also makes a considerable difference in the severity of the incurred lag. See my next comment.
The lag is present even when the circuit is built in the middle of the chunk (see the forest screenshot above). It therefore doesn't seem likely to be caused by MC-1692.
Sadly still an issue in 1.13.2 – but the 1.14 snapshot 18w44a looks promising with 60 FPS at v-synced fancy graphics, performing better than 1.12.2!
[media]I also notice considerable improvement in larger contraptions, although the frame rate still is affected. I suggest prior commenters to rerun their tests in the snapshot and write back what they think so we can update the issue accordingly.
My personal experience with smaller circuits is that only light level changes cause a noticeable drop in the frame rate. The redstone circuits themselves have improved; lighting updates such as Tim Fellow's redstone_lamp_13pre6.gif are still problematic.
This issue affects 18w48b. The smoothness seems to have improved in the 1.14 snapshots compared to 1.13, but updating lighting still causes noticeable framerate drops.
Redstone causing lag seems to be almost entirely dependent on chunk geometry as in MC-123584. I tested in 19w13b, but is prevalent in all snapshot versions I've been playing recently. A simple observer clock causes massive frame time spikes in a chunk (or immediately next to a chunk) full of fences, but has very minimal effect on frame time one chunk over.
[media][media][media]
Okay, yeah I went to the nether and started mining glowstone. I get a lag spike each time one breaks or is placed. I'm pretty confident it's the lighting updates.