Lava Generator FPS Loss
PessimisticBastard opened this issue ยท 5 comments
Versions
- Silent's Mechanisms: 1.14.4-0.6.8+41
- Silent Lib:1.14.4-4.4.0+44
- Forge: 28.1.87
- Modpack: N/A
Expected Behavior
- I expect the lava generator to function without a 10-15 FPS loss.
Actual Behavior
When the lava generator is used, I notice I lose 5-10 FPS. If the lava generator is constantly turning on and off (flickering) due to producing more RF than is being used, the loss seems to go to about 15 FPS. I should note that I have no such issues with the coal generator, with no FPS loss whatsoever.
Links/Images
Steps to Reproduce the Problem
- Use lava generator to make RF.
Can confirm, my FPS begins to stutter when it is flickering on/off between the two textures.
Not sure how to best handle this, aside from disabling the state changes altogether. The coal generator is fine because it consumes a whole piece of fuel at once, but the fluid generators only consume 1 mB at a time, running just a few ticks.
One possible temporary solution would be to create a setup that only enables generators when energy in a battery box or whatever falls too low. You can use CC Tweaked computers to read energy levels, for example.
Checking every tick if it should consume just 1mB
, and having that update the texture of the tile entity itself is quite intensive. I think the best solution is to have it perform like the Coal Generator where it consumes up to 100mB
(configurable) and then generates over time - this way, it would consume whatever is left not leave left over millibuckets in the tank buffer (min(lava buffer, max buckets per operation)
).
It all comes down to, one machine draws say 1RF
and then the Lava Generator immediately uses up 1mB
to replace that 1RF
and in the time it goes to do that, it updates the texture - causing flickering, destroying the FPS.
The loss of fuel efficiency there bugs me a bit, but I guess fuel efficiency is something the player should work for. Adding a config with a default value of 100 mB. For reference, the lava generator burns for 5 ticks/mB and the diesel generator is 10 ticks/mB.