Straywave / ImmersiveSnow

Small tweaks that add to Minecraft's Winter theme.
https://modrinth.com/mod/immersive-snow
MIT License
2 stars 5 forks source link

Incredible Lag #2

Open InsaanNotFound opened 1 year ago

InsaanNotFound commented 1 year ago

Here's a Spark log: https://spark.lucko.me/IuiAtVMSco

Straywave commented 1 year ago

Sorry, can't load it on my side, can you please export it as a file and upload it as an attachment? Also what MC version are you on?

Was able to download file using another browser

Straywave commented 1 year ago

This is very weird, the thing that's causing all the lag is retrieving chunks from the world, something which is normally very quick if not instantaneous

Straywave commented 1 year ago

Can you please load only Immersive Snow and do a profile without any other mods? And if there is no lag, then can you try doing Binary Search to find the mod that causes the lag? (Keep Immersive Snow and knock out each half over and over until you find the combo that causes the lag)

Straywave commented 1 year ago

Another person had a similar lag issue, where the world straight up wouldn't load for 5 minutes. This was due to incompatibility with "Unusual End" mod. As that mod is not open source, I can't look through the source code to easily find an incompatibility, however the fix is to set the "Endermite to Enderblob conversion" option to 0 in the config of Unusual End mod.

However I do not see Unusual End in your mods list on Spark. But I still think that it is a mod conflict, just with another mod.

Straywave commented 1 year ago

Here is the specific line that's causing all the lag, it loads/checks if chunk is loaded before making block modifications. I'll try a different way of doing it and see if it can increase performance. A mod like this is inherently laggy since it is replacing a lot of blocks in real-time, however it shouldn't be this laggy, on my side it uses at most 1% of the server thread when running standalone, but for you it's using almost 29%...

https://github.com/Straywave/ImmersiveSnow/blob/d9f902447ce2deb6353dc28e7dd7546d761e2870/common/src/main/java/straywave/minecraft/immersivesnow/ImmersiveSnowEvents.java#L42

AltoClef6115 commented 1 year ago

This happened to me just now, but I don't have the Unusual End mod

Straywave commented 1 year ago

@AltoClef6115 Can you also upload a Spark profile? I want to see if there is any similarities

SimonMeskens commented 1 year ago

https://spark.lucko.me/NdfUzMdzak

I think this is the same issue? (EDIT: I don't have Unusual End)

SimonMeskens commented 1 year ago

Interesting observation: if I exit the world and load it again, it stops lagging in perpetuity, it's only on initial save gen that this happens.

Straywave commented 11 months ago

New v1.3.0 should definitely change it, not sure if it will be better or worse. You can get the master builds via github actions.