Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Large laggies due to dynamic light from the first person #39

Closed
zed1ker opened this issue Jul 23, 2024 · 2 comments
Closed

Large laggies due to dynamic light from the first person #39

zed1ker opened this issue Jul 23, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@zed1ker
Copy link

zed1ker commented Jul 23, 2024

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
@zed1ker zed1ker added the bug Something isn't working label Jul 23, 2024
@zed1ker
Copy link
Author

zed1ker commented Jul 25, 2024

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

@KostromDan
Copy link

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.
    [Bug] Lag spikes because of dynamic lights 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.

@zed1ker zed1ker closed this as completed Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants