RyoamicLights

RyoamicLights

7M Downloads

Large laggies due to dynamic light from the first person

zed1ker opened this issue · 2 comments

commented

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
image

Default frametime
image

Steps:

  1. Join in the world
  2. I pick up any luminous object
  3. Big laggs
Mods

image
image
image
image
image
image
image

  • OS Windows 10
  • Minecraft version 1.21
  • Fabric Loader version 0.16.0
  • Mods: in screenshots
  • Version 0.2.9
commented

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

commented

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.
    copycats-plus/copycats#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.