LambDynamicLights

LambDynamicLights

19M Downloads

Moving and holding a light emitting item causes severe lag

catgirldoll opened this issue ยท 16 comments

commented

Describe the bug
When holding an item which produces light and moving, the client experiences massive frametime spikes and no light is visibly cast. When not moving, the frametimes return to normal.

To Reproduce
Steps to reproduce the behavior:

  1. launch Minecraft 1.17 with the mods detailed below (only LDL and Fabric)
  2. Hold a light-emitting item
  3. Move
  4. ???
  5. Massive frametime spikes

Screenshots
While moving
While idle

Desktop:

  • OS: Windows 10 Pro build 19032.985
  • Minecraft 1.17.0
  • Fabric Loader version 0.11.3
  • Mods: fabric-api 0.34.9+1.17, lambdynamiclights v2.0.0+1.17
  • Java: OpenJDK 16+36
  • Args: -Xms4096M -Xmx6144M -XX:+UseZGC
commented

Sadly, I have to say it's expected behavior without Sodium.

The mod severely relies on chunk rebuilding to update the light levels, which asks the game to re-generate the entire chunk geometry. Which takes time and can get very noticeable with mods like this. This mod doesn't optimize in anyway chunk rebuilding. Your only hope is to wait for Sodium.

even with sodium i get very bad fps stuttering (feels like 30fps, very unpleasant.) when moving while holding a torch. setting it to "fast" or "fastest" helps a little, but all it does is make the fps stutters happen slightly less often. i don't understand why this has to cause so much fps stuttering.

commented

in 1.16.5 with Iris and the sodium fork that comes with it there are no issues, but in 1.17.1 with the same setup, so Iris+sodium it does have this issue on my end. This is with overpowered hardware aswell.
https://spark.lucko.me/PuNMxAeo0L
https://youtu.be/URgbUliCOpQ

commented

The performance issues should be minimized with latest commits.

commented

Even with sodium installed the issue persists. The weird thing is my frame times are actually much faster with shaders enabled then with shaders disabled.

commented

Bump for issue persists.

commented

Same here; other that want to +1 can use the thumbs up to do so on t his comment.

commented

Sadly, I have to say it's expected behavior without Sodium.

The mod severely relies on chunk rebuilding to update the light levels, which asks the game to re-generate the entire chunk geometry. Which takes time and can get very noticeable with mods like this. This mod doesn't optimize in anyway chunk rebuilding. Your only hope is to wait for Sodium.

commented

Ah, that makes sense. The complete lack of emitted light from held items even while standing still should perhaps be a separate issue then!

https://github.com/Kroppeb/sodium-fabric is a Sodium 1.0 port to 1.17 including a bunch of new code which will feature in Sodium 2.0. It's effectively a proof of concept build, but may work for the purpose of optimizing chunk rebuilding. I'll test it later and update this!

Edit: it does indeed reduce the LDL frame time spikes to playable levels.

commented

The current sodium build works fine for me

commented

The current sodium build works fine for me

The issue report is regarding 1.17, which to date has no official Sodium builds

commented

The current sodium build works fine for me

The issue report is regarding 1.17, which to date has no official Sodium builds

I know. The currect (self compiled) version works fine

commented

Running with Kroppeb Sodium fork completely fixes the issue. It's only a game of patience waiting for Sodium to release for 1.17 then.

commented

Screenshot from 2021-06-27 17-44-31
I have this issue on 1.17, even with the sodium beta and starlight installed.

commented

Screenshot from 2021-06-27 17-44-31
I have this issue on 1.17, even with the sodium beta and starlight installed.

That lag is way less then without sodium

commented

Keep in mind my baseline fps are about 200, and snessim's were about 60, so the peaks scale down accordingly, and realistically I don't think peaks down to 30fps with a baseline of 200 are normal.

commented

Things are looking great in combination with Sodium B3