-
Notifications
You must be signed in to change notification settings - Fork 95
Description
Version info
Modern Industrialization 2.2.25
Minecraft 1.21.1
NeoForge 21.1.79
Modpack: Craftoria 1.9.0
Expected result
Reasonably smooth performance, even with dozens or hundreds of multiblocks.
Actual result
When there are a large number of MI multiblocks present in one area, holding an MI hatch in either hand causes a severe FPS drop due to trying to render a large number (thousands) of possible locations for hatches within the multiblock structures.
The linked and attached Spark profile shows this issue with approximately 142 MI multiblocks within the area and holding an MI item input hatch.
https://spark.lucko.me/5XnqRehlIZ or 5XnqRehlIZ.zip
A large amount of the additional time is spent calling this function repeatedly (once per possible hatch location per frame totaling tens of thousands of calls per second).
Line 69 in 51faadc
| RenderHelper.drawOverlay(matrices, vcp, 111f / 256, 1, 111f / 256, 15728880, overlay); |
Steps to reproduce
- Build a few dozen MI multiblock structures in one area (ideally in a superflat world or void dimension).
- Hold an MI hatch in your hand.
- Notice the loss in FPS.
The actual performance impact is proportional to the number of possible hatch locations (green overlay boxes), which depends on the number and type of multiblock structures present – multiblocks with more flexible hatch placement have a bigger FPS impact while the player is holding a hatch.