Closed NXTler closed 1 month ago
Better thread management than vanilla is already part of the mod, it reduces frame spikes when generating/loading chunks by reducing vanilla's overallocation of threads to chunk gen and background tasks (see the render
and util_thread_counts
mixins). However, some of this is undone when Sodium is installed. #29 should fix the frame time spikes you were noticing. I'm also not quite sure what you mean by the suggestion in the last sentence.
I did test the mod with just FabricAPI and ModMenu installed, which shouldn't affect anything, and I was still observing large lag spikes on the rendering thread. I also tested the mod with VulkanMod, which shouldn't modify threading in any way, to rule out lag spikes from chunk loading and a very similar behavior was observed. Please excuse my very bad phrasing in my previous suggestion. I essentially meant that using the rendering thread for chunk generation, I/O, ect. should be avoided to reduce these lag spikes.
Do you still experience the same issue without moonrise…?
No, it's only happening with Moonrise installed.
I created three videos to better showcase the issue. The first one is just vanilla, the second one is just Moonrise and the third one is VulkanMod with Moonrise to rule out chunk loading issues. For Vanilla and VulkanMod I also used F3 + A to show the effect of chunk loading on frame time, but the beginning is a bit cut off for some reason.
https://github.com/user-attachments/assets/6cce5e81-8272-4034-80db-a1d6e623955c
https://github.com/user-attachments/assets/b49715f5-457f-42b9-8f69-3b4b9f7f33c0
https://github.com/user-attachments/assets/a4a4765d-1181-4415-b6f5-710277ba3d42
Any clue what might cause this?
Chunks aren't generated on the render thread, what jmp was referring to is bad thread management taking away processing time/threads from other things. He also made #29 to reduce light processing load
I see, thanks for the insight.
I just tested the dev artifact and it seems to fix the issue. There are some spikes, but these might as well be from the rendering chunk builder. This can be closed once the pull request is merged.
https://github.com/Tuinity/Moonrise/commit/fef4872a3ae504439eee73ff0b0b91633d20764e Will be fixed in the next beta release, or if you download the latest actions artifact.
I'm currently creating a performance Modpack and during testing with Moonrise I noticed large lag spikes during chunk generation/loading. Taking a look at F3 + 2 profiler, I noticed that Moonrise sometimes seems to utilize the rendering and the client thread, causing stuttering. My suggestion is to maybe blacklist the client and rendering threads to prevent this from happening.