Redi2Go / PhotonicEngine

13 stars 0 forks source link

Improve World building CPU performance #31

Open nitanmarcel opened 1 month ago

nitanmarcel commented 1 month ago

When switching to creative game mode and back breaking blocks get delayed, same with interacting with other doors, or placing blocks.

Redi2Go commented 1 month ago

I cannot reproduce the issue and I cannot see how changing to and from Creative Mode should have this effect. Does this occur on other occasions as well? Have you tried turning on Multi Threading?

nitanmarcel commented 1 month ago

I cannot reproduce the issue and I cannot see how changing to and from Creative Mode should have this effect. Does this occur on other occasions as well? Have you tried turning on Multi Threading?

This time it happened without switching. I just created a new world with game cheats enabled

https://streamable.com/osvh0u

Ignore the audio stutter that's from the video recording, but the block break delay does happen in game

Redi2Go commented 1 month ago

Unfortunately the video is no longer available. But I would have to guess that this is caused by a CPU bottleneck. I myself am running a 10-core CPU and I do experience delayed chunk updates from time to time. Unless it's a specific, reproducible scenario, where that issue arises, I'm afraid I am going to have a hard time fixing that issue.

nitanmarcel commented 1 month ago

Unfortunately the video is no longer available. But I would have to guess that this is caused by a CPU bottleneck. I myself am running a 10-core CPU and I do experience delayed chunk updates from time to time. Unless it's a specific, reproducible scenario, where that issue arises, I'm afraid I am going to have a hard time fixing that issue.

could be a cpu bottleneck. it seems that it doesn't happen instantly but it takes a few seconds for the bug to settle in from the world creation

nitanmarcel commented 1 month ago

multithreading didn't seemed to do anything in the old world, but i created a new one and it seems to help a little. I do sometimes get small delays. here's the video I posted earlier

https://youtu.be/U6fhWteESHg

Redi2Go commented 1 month ago

Yeah...it does seem like a CPU bottleneck to me. What CPU do you have installed? Is it a 4-core system? Maybe I can optimize the thread dispatch count for lower end CPUs.

Is block placing equally laggy?

nitanmarcel commented 1 month ago

Yeah...it does seem like a CPU bottleneck to me. What CPU do you have installed? Is it a 4-core system? Maybe I can optimize the thread dispatch count for lower end CPUs.

Is block placing equally laggy?

Yes, placing blocks it's also laggy the same way breaking them is. About the cores, yes there are 4 of them.

(These stats are without minecraft running) image

nitanmarcel commented 1 month ago

This seems the have changed in the latest update, while still delayed, it's not as delayed as in the previous version and enabling multi-threading seems to get rid of the delay all together.

But maybe I got lucky with the biome I spawned in? Will have to play the game a little more with the mode to see if the issue is gone now

nitanmarcel commented 1 month ago

I also forced the CPU a little by making Distant Horizons use more of it's resources, the delay does happen from time to time but it's bearable