Integrated Dynamics

Integrated Dynamics

63M Downloads

Intermittent periods with very high tick times

Silfadur opened this issue ยท 9 comments

commented

Issue type:

  • ๐ŸŒ Performance issue

Short description:

Tick time spikes up to 200ms for some amount of time (up to minutes) randomly, spark profile leads me to believe its related to Integrated Dynamics. Its a small and relatively fresh server, with seemingly noone actively using Integrated Dynamics yet.
The server is running the Valhelsia 5 modpack.
image

Steps to reproduce the problem:

  1. sadly i have no steps to reproduce yet.

Versions:

  • This mod: 1.16.2
  • Minecraft: 1.19.2
  • Forge: 43.2.4

Profiler output:

https://spark.lucko.me/I99xsFhRZh

commented

Aha, that seems related to the new part offsets functionality (showing offsets while holding a wrench).
So the lag spikes probably occur whenever anyone is holding a wrench.

Could you try lowering partOffsetRenderDistance to another value, e.g. 16, to see if that resolves your problem?
If so, I'll look into making that the default.

commented

Thanks for reporting!

commented

Thanks, can confirm that it was happening with a wrench in hand. i reduced partOffsetRenderDistance from 64 to 16 and it looks like that fixed it, i will keep an eye on that.

commented

Thanks for the update! Will look into making that the default then.

commented

why does this issue seem to happen even when there aren't any blocks from ID near the person holding the wrench (as experienced on my server. No one is using the mod, but holding any other mod's wrench has the same effect)? I would think you would only show part offsets when there's a part nearby right? That is, the performance impact should be negligible unless there are a lot of blocks that needs to update their rendering in response to the wrench. Unless I'm completely misunderstanding something...

commented

What is your partOffsetRenderDistance set at @macks2008?

commented

It was set to 64. The issue does get much better if it's set to 16, but I'm skeptical as to why. To get this kind of performance gain just from lowering a number by three quarters seems strange to me. Can you point me to the relevant code?

commented

It just considers a radius in 3 dimensions. 16^3 is a lot smaller than 64^3.

commented

Are you just searching an entire radius for your own blocks?