Closed zed1ker closed 5 days ago
Honestly, I tried to figure out what the problem was, turned off the mods, turned them on and nothing helped. The problem is fixed if I run the game with a maximum of 20 mods
there may be an incompatible mod, but I still haven't been able to figure out which one
if anything, dynamic resources are disabled in the mod Modern Fix, so it shouldn't affect
For my modpack: Lag spikes with moving dynamic lights are a triple combo. Spent 20 hours on it. 3 reasons (if even one of these issues isn’t fixed, the problem will persist):
1) A conflict between ModernFix (mixin.perf.deduplicate_location=true
) and CopyCats mod.
CopyCats creates new ResourceLocation
very many times per tick at com.copycatsplus.copycats.compat.Mods.rl()
, which shouldn't happen.
Since deduplicate_location
tries to fix duplicated ResourceLocations it caused lag spikes.
https://github.com/copycats-plus/copycats/issues/176
2) The modpack had the Embeddium option "chunk_builder_threads": 1
enabled.
By default, it’s set to 0, meaning the number of threads is determined automatically (at least 2-4 for modern CPUs).
A single thread caused various issues, including with this option.
3) I was trying to figure out why the BetterMC modpack didn’t have this problem at all, while it was very noticeable in mine.
Using binary search, I discovered that BetterMC had the option always_defer_chunk_updates": true
enabled in its Embeddium config.
Result: All issues identified and resolved. No more lag from dynamic lights at all.
Large laggies due to dynamic light from the first person If you turn off the light from the first person, there are no lags Maybe it's because of someone else's fashion
Frametime when I hold a glowing object in my hands
Default frametime
Steps:
Mods
![image](https://github.com/user-attachments/assets/53c96278-48c7-4810-ab89-be839c577ae8) ![image](https://github.com/user-attachments/assets/36e4473f-e5e5-401e-89e8-06077e83afdb) ![image](https://github.com/user-attachments/assets/7486522a-e644-45fc-b8d5-d3225946abd4) ![image](https://github.com/user-attachments/assets/9af08cce-a2c9-4f63-90c4-817796d7f5ae) ![image](https://github.com/user-attachments/assets/3078f3d0-f58a-4793-b80f-2b4719c8d5c5) ![image](https://github.com/user-attachments/assets/4290c2ab-3e30-4611-bb02-18339fa4b6ec) ![image](https://github.com/user-attachments/assets/e32eba71-c606-448c-b964-ea7e18a9b71e)