[Bug] Lag spikes because of dynamic lights
Closed this issue ยท 2 comments
Describe the bug
Moving dynamic lights source with enabled ModernFix mixin.perf.deduplicate_location=true
causing lag spikes
This happens because CopyCats constructs new ResourceLocation
very many times per tick at com.copycatsplus.copycats.compat.Mods.rl()
, which shouldn't happen.
https://spark.lucko.me/FYo6L9kJjY
To Reproduce
Steps to reproduce the behavior:
mixin.perf.deduplicate_location=true
- Modify in
betterf3.toml
:
[general]
always_show_tps = true
to see profiler graphics.
4. Take torch in hand and run. See lag spikes.
Desktop (please complete the following information):
- Minecraft Version: 1.19.2
- Mod Loader: Forge
- Mod Version: 2.1.4
I suggest to cache ResourceLocation
. If it's new, call new ResourceLocation
and add result to cache.
If it's in cache return from cache.