GregTech6 / gregtech6

This is the Official Repository of the Mod GregTech 6 for Minecraft 1.7.10
https://gregtech.mechaenetia.com
Other
189 stars 53 forks source link

BlockOcean.updateTick() (mostly) drops framerate and it's a pain. #110

Open kanayaya opened 1 year ago

kanayaya commented 1 year ago

Every replacing fluid consumes up to 90% tick update time, so it's dropping FPS even when you stay still. IMG_20230805_132023_533.png

When method returns doing nothing fps become smooth, except for if you generate new world chunks.

Tried to put it into static threadPool. Got exception :)) so, i think there is no way except for improving method itself , maybe, rejecting 95% of calls? Ocean will spread way slower but performance will rise

GregoriusT commented 1 year ago

Yeah your suggestion would actually make the problem worse in some aspects because it would accumulate even more updates over a bigger area, not resolving any flooding for a long while.

Putting it into a different Thread may sound fine at first, until you realize just how terribly Minecraft is coded, not allowing Block changes from Threads other than the main one.

By the way you say FPS are being dropped due to this? That actually is not the case because this does not influence rendering or sounds, its purely "serverside" and therefore only lags the tick rate. You would have to have a Single Core Processor for this to cause FPS Lag.

The Ocean Blocks will stop ticking once they are done flooding the Caves, so the Lag you get from them is actually still part of Worldgen Lag, so just give it a few minutes and it should stop lagging.