Energy cube causing massive FPS drops
Tajmoti opened this issue ยท 9 comments
So, When I place a nearly full energy cube and it is only discharging (nothing charging it), my FPS drop from 200 to like 160-170. Ok. But when Some machines take energy out of it and my Gas burning and windmill generators are charging it quicker than it can discharge so It is at 31.99MJ all the time, my FPS drops massively, from 200FPS to 60-80FPS. It makes the game really stutter and it can be a pain for the slower PC users. Please could you look into this
I have this problem as well. I'm not sure if it's the energy cube. But it is really noticeable, and it disappears a few seconds after I cut the cables feeding the cube power.
I thought it might be the 16 heat generators, so I replaced them with one windmill, but still getting slowdowns.
The weird thing is, the FPS meter still shows my game capped at 70fps (vsync is on), but the stutter / slowdown is highly noticeable, it feels more like 20fps.
Currently on build 110.
Good answer, @Cazzar. I'll see if I can find where all the reflection is happening.
Though this might not be directly related to the issue, https://github.com/aidancbrady/Mekanism/blob/master/src/main/java/mekanism/client/sound/SoundHandler.java#L314 does take up a fair selection (all this data can be obtained via JVusualVM)
Good news on that front - I've already entirely rewritten our sound system to use MC's native system, which should prevent any reflection lag due to that when released.
Like others, this is true, running a java profiler on it, seems to do a lot of reflection, a suggestion for your reflection, if you have to do reflection calls either use FMLAT (META-INF value, file sits in resources IIRC) or just cache the field or the method object to call, because java will eventually optimize to run a lot quicker on a lot of calls.
It is interesting that you mention this. Actually none of my mekanism
machines are emitting sounds. I had disabled them via the config option on
an earlier build, so I thought that was the reason. But maybe the system is
throwing an exception for every sound it is supposed to play?
Shouldn't be - I'm fairly sure sounds just noop if the config option's off.