Client frame stutters/pauses when opening a terminal and transferring items via terminal
Wolfizen opened this issue ยท 5 comments
Issue type:
- ๐ Performance issue
Short description:
When opening a terminal, withdrawing items, or depositing items, my client pauses rendering new frames for up to a few seconds. My client pauses all rendering, so the tooltip doesn't move, animations aren't played, etc.
This occurs instantly when opening a terminal, but after a half-second delay when withdrawing or depositing items. In the item transfer case, the render delay seems to coincide with the update of the terminal's displayed items.
The problem seems to scale with the number of items in the network.
Steps to reproduce the problem:
- Download and install the "All the Mods 7" modpack, version 1.0.4.
- Remove the "Just Enough Effect Descriptions" (jeed) mod from the pack.
- Update all Integrated series mods to the versions listed below.
- Launch and start a new singleplayer world.
- Create a logic network with 160 gold chests attached via item interfaces.
a. I tested and reproduced with chests from both Iron Chests and Sophisticated Storage. - Connect a storage terminal.
- Connect a chest via an item importer, configured to import all items.
- Fill the network with about 800 Apotheosis gems via the import chest.
a. I used a Repeating command block running "execute as [MyPlayerName] run apoth gem random" to get the gems quickly. - Access the network via the terminal, withdraw and deposit items.
Versions:
- This mod:
- IntegratedTerminals: 1.18.2-1.4.12
- IntegratedTunnels: 1.18.2-1.8.22
- IntegratedNBT: 1.18.2-1.5.1
- IntegratedCrafting: 1.18.2-1.1.6
- IntegratedDynamics: 1.18.2-1.17.5
- CyclopsCore: 1.18.2-1.17.9
- Minecraft: 1.18.2
- Forge: 40.2.17
Profiler output:
These profiles were taken on a multiplayer world hosted via LAN, connecting as a client. This is where I initially observed the issue. The symptoms are the same as in the reproduction steps scenario above.
Server: https://spark.lucko.me/emEqxhMKrw
Client: https://spark.lucko.me/Taw1CN9jl9
Client logs: https://mclo.gs/4YW5Yqj (the link labels it as from the server, but the logs were actually taken client-side)
Unfortunately, MC 1.18 is not being maintained anymore. My list of supported MC versions atm is 1.19.2, 1.20.1, (1.20.4 for major issues), and 1.21.1. Anything more just becomes too much work for me.
I do however want to help looking into this issue, but there probably won't be a new patch for this MC version as a result.
A first thing that could help you, is to lower the terminalStoragePacketMaxInstances
config option, which should spread the load on the client a bit.
Aside from that, if you're willing to look into this, I would also be interested in knowing if you can reproduce this problem in MC 1.19.2 or above. There have been a good number of performance improvements since then. But if this problem still occurs there, it must be fixed of course.
Thanks for reporting!
Welcome!
I edited now to add a clarification to reproduction step 5 and add an additional observation to the description.
I see, thanks for sharing these findings @Wolfizen!
It's good to hear that the problem does not seem to occur for you anymore in 1.19.2.
Since you seem to have a good workaround, I'll close this issue here.
Should anyone run into this problem in 1.19.2 or higher, please let me know.
Unfortunately, MC 1.18 is not being maintained anymore. My list of supported MC versions atm is 1.19.2, 1.20.1, (1.20.4 for major issues), and 1.21.1. Anything more just becomes too much work for me.
I do however want to help looking into this issue, but there probably won't be a new patch for this MC version as a result.
A first thing that could help you, is to lower the
terminalStoragePacketMaxInstances
config option, which should spread the load on the client a bit.Aside from that, if you're willing to look into this, I would also be interested in knowing if you can reproduce this problem in MC 1.19.2 or above. There have been a good number of performance improvements since then. But if this problem still occurs there, it must be fixed of course.
I understand. Thank you for your advise and willingness to explore solutions within your support scope. :)
I tried reducing the terminalStoragePacketMaxInstances
option, returning to the main menu after each config change. Unfortunately this only made it worse :( the freezes got longer as I reduced this value. Maybe the freeze length is proportional to the number of packets rather than the size of the packets? Increasing the value did not seem to make the freeze shorter, although I only tested up to 1024.
I also tried reproducing this on MC 1.19.2, using the All the Mods 8 modpack. I was not able to reproduce it, indicating that it has likely been fixed in some version after the latest version for MC 1.18.2.
I did notice that in the client profiler result, the majority of the time is spent within a BlockableEventLoop. Perhaps the Integrated Terminals packet processing happens there and in turn is blocking client rendering? I'm not an expert in client-side modding so it's just a guess.
Overall, no positive results yet. I'll understand if you close this issue, but I'll remain willing to test other things if you want to keep going.
Mitigation
I was able to mitigate this issue by hooking up an Applied Energistics 2 network via an Integrated Tunnels Item Interface + AE2 Storage Bus, then using an AE2 terminal to access the items. The deposit and withdrawal times are slower than with native AE2 storage, but they are much faster than with an Integrated Terminals terminal and there is no client freeze when transferring items.
If anyone comes across this issue, this workaround should help! I also tested Refined Storage and it worked the same.