Tech Reborn

Tech Reborn

30M Downloads

Optimization of multiblock structure verification

Ftrless opened this issue ยท 3 comments

commented

Describe the bug
It's not exactly a bug, but it's also a significant problem - checking if the structure is correct eats a lot of ns per tick. As an example, I can cite checking the structure of a maximal fusion reactor. Is there any option to optimize this (like caching)?

Screenshots
image

Environment (please complete the following information with the version):

  • Minecraft: 1.20.1-1.21
  • Mod Loader: fabric
commented

Improving this will require a significant amount of work, this should only effect the larger reactors.

commented

In fact, the problem is not only with the reactors, although they are the main source of the load. In general, it would be nice find some way to globally optimize verifying of all structures

commented
image

A small change in logic to check every second instead of every tick dramatically reduced the load. Can generally leave it like that:)))

telegram-cloud-photo-size-2-5226649963289762546-y