Extended Drawers

Extended Drawers

145k Downloads

[Bug]: Actions on large Storage Networks kill the performance

AlexaRawr opened this issue ยท 15 comments

commented

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:
image

This is my storage room:
image

Reproduction steps

  1. Build a very large storage room
  2. 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

https://pastebin.com/5pwWzmdJ

Extra Context

No response

commented

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.

commented

Also, the pastebin is removed (did you set a expiration?)

commented

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

commented

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.

commented

Sure, here's the result: https://spark.lucko.me/lyirSTckUD. Hope I did it right

commented

Seems like you made a client side profile with /sparkc. Use /spark for a server side profile. The lag is server side

commented
commented

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.

commented

I'll see what I can do.

commented

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.

Extended Drawers Performance Testing 1.zip

commented

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

commented

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

commented

Great so its working perfectly fine, thanks a lot!!!

commented

The next release will contain some performance improvements. I'm still looking for more ways to improve performance

commented

Seems like I forgot to close this