![Extended Drawers](https://media.forgecdn.net/avatars/thumbnails/538/621/256/256/637863952831371196.png)
[Bug]: Actions on large Storage Networks kill the performance
AlexaRawr opened this issue ยท 15 comments
Description of the issue
Hey, I recently built a large main storage using this mod's drawers (1320 Quad Drawers each with Iron Upgrade) which is hooked up to some farms. But taking items out of this large storage network using shadow drawers or putting items in using access points absolutely massacres the MSPT/TPS. When I run my afk tree farm (which takes bone meal out of the storage and puts in logs, apples, sticks and saplings) my MSPT shoots up to over 70 in both singleplayer and on my server. If I only connect the farm to some drawers, the MSPT/TPS is perfectly fine, so I guess this mod simply isn't optimised yet for such large storage solutions.
I built a simple contraption which makes this problem very easily reproduceable:
Reproduction steps
- Build a very large storage room
- Have a constant flow of items going in and out of the storage network using shadow drawers/access points
Mod version
v1.3.3
Operating System
Windows 10
Minecraft version
1.19.2
Other mods
fabric-api-0.60.0+1.19.2
DistantHorizons-1.6.9a-1.19.2
fabric-carpet-1.19.1-1.4.83+v220727
indium-1.0.7+mc1.19
iris-mc1.19.1-1.2.6
litematica-fabric-1.19.2-0.12.4
malilib-fabric-1.19.2-0.13.0
minihud-fabric-1.19.2-0.23.3
modmenu-4.0.6
Patchouli-1.19.2-76-FABRIC
phosphor-1.19.2
sodium-fabric-mc1.19-0.4.2build.16
tweakeroo-fabric-1.19.2-0.14.3
Server
Happens
Client
Happens
Logs
Extra Context
No response
I'm not sure if I can do anything about this, at least for the access point. I already cache the combined inventory. I might be able to make shadow drawers more performant.
I suspect your issues are just caused by having to search through every slot for the right item.
I guess I could group by item or something, but that'd only work when multiple slots have the same items.
Also, the pastebin is removed (did you set a expiration?)
Nope, but there wasn't anything interesting going on anyway, just that the server can't keep up
Could you run a the spark profiler while inserting and extracting a lot? It'd help with debugging as I won't have time to test until sunday.
Sure, here's the result: https://spark.lucko.me/lyirSTckUD. Hope I did it right
Seems like you made a client side profile with /sparkc
. Use /spark
for a server side profile. The lag is server side
Whoops, there you go https://spark.lucko.me/ewxTiCNgzH
After checking the result i came to the conclusion the problem are the many many shadow drawers i have to manage my storage. After removing all of them the mspt go back to normal, so they indeed are the issue.
I've made some changes and want you to try it out. Ideally with all those shadow drawers. The jar is in the zip as github doesn't allow jar uploads.
Performance is a lot better now, according to the MSPT displayed by the carpet mod. It only goes up to ~10mspt.
Spark however shows very weird results: https://spark.lucko.me/HNWlQej8VT
That spark result isn't weird at all. Unsafe.park()
means that the game is waiting on something. In this case that is the next tick
The next release will contain some performance improvements. I'm still looking for more ways to improve performance