Mekanism Additions

Mekanism Additions

21M Downloads

Hard performance hit with multiple big dynamic tanks

ENiGMA9 opened this issue ยท 3 comments

commented

Issue description

Big dynamic tanks take a lot of tick time and introduce microstuttering regardless of framerate.
From the profiler, the time is spent between dynamic_tank, structural_glass, and some unspecified group of tasks.

Going far away from them increases FPS since they are not rendering but micro stutters are still felt.

Does not matter if they are incomplete (missing 1 block) or well built with a valve, they still tank the performance.

I've first encountered this in a 1.16.4 modpack and reproduced it in 1.19.2 with mekanism only, with the same or even fewer conditions (built only the tanks)

I attached a profiler log from 1.16.4 since I can't get the 1.19.2 one to output the file

Steps to reproduce

  1. Build a 16x16x16 dynamic tank with the floor made of dynamic tank and walls filled with structural glass.
  2. Get 20+ of them. Either build them by hand or copy and paste this tank repeatedly until you have 20+ or your game moves choppy at any FPS.
    https://prnt.sc/XfMfJoYM_6sZ

Minecraft version

1.19.2 (Latest)

Forge version

43.1.47

Mekanism version

10.3.5 (Latest)

Other relevant versions

On Minecraft 1.16.4 with Mekanism 1.10.19

Profiler log for 1.16.4

https://pastebin.com/m9zA5NNU

commented

If vanilla's profiler isn't working there is a chance that https://www.curseforge.com/minecraft/mc-mods/spark using their /sparkc (for client side) instead of /spark (for server side) might be able to produce some profiling results. I also believe in regards to why it isn't making a fie in 1.19.2 is that I think mojang at some point changed what you have to do if you want it to actually output a file.

In regards to the profiler log from 1.16.4 that unfortunately doesn't really help much as in 10.3.4 (1.19.2) I made a bunch of tweaks to improve performance of rendering various things in Mekanism.

commented

Thanks!

For 1.19.2:
Spark log: https://spark.lucko.me/RV0IJP7NqL, it doesn't seem to reflect 1:1 what the in-game profiler says.

Pie profiler:
https://user-images.githubusercontent.com/11443176/197400898-270b7712-5288-4c6c-87ae-5d9d04e36402.png
https://user-images.githubusercontent.com/11443176/197400900-7162b0d6-5244-4b63-bc7b-afc5fc554981.png

For 1.16.4:
https://spark.lucko.me/15eNCvE5TC
https://user-images.githubusercontent.com/11443176/197401157-2e789297-dcce-43cc-a6e3-de3c77ce9c4f.png
https://user-images.githubusercontent.com/11443176/197401160-e25b6f83-08b5-4243-a4f2-bb828143e8c1.png

Both are running on the same world, firstly created on 1.16.4 though, I'm not sure if this would affect the results.
There seems to be an improvement in 1.19.2 over 1.16.4 but in this specific case with big multiple dynamic tanks, it still takes a lot in % without other stuff going around.

commented

In my case, the fps drops to 1 in my modpack when I get totally close to the Digital Miner, in Minecraft 1.18.2