GTNewHorizons / GT-New-Horizons-Modpack

New Modpack with Gregtech, Thaumcraft and Witchery
https://www.gtnewhorizons.com/
Other
991 stars 300 forks source link

Fluid AutoFiller causes major TPS loss during large crafts #16010

Open fluffle opened 6 months ago

fluffle commented 6 months ago

Your GTNH Discord Username

fluffle

Your Pack Version

2.5.1

Your Server

private MP

Java Version

Java 21

Type of Server

Vanilla Forge

Your Expectation

Starting a large craft (e.g. enough Gallifreyan parts for an EoH) does not bring my server to its knees :-)

The Reality

https://spark.lucko.me/FJyFlDd3Vk https://spark.lucko.me/v60Haliu2J

The call chain is pretty deep, but to my untrained eye it seems that every time a fluid craft completes and the associated multi ME output hatch needs to insert items into the network it triggers the auto filler to ask the AE network to completely rebuild it's crafting grid cache, because the possible recipes it can craft has changed.

Doing this every few ticks is quite expensive, I think, especially when there are multiple large crafts underway.

Your Proposal

I don't have a concrete proposal because the AE codebase is pretty complex and I don't have the time or inclination to understand it deeply in the context of solving this problem. Probably the least nasty way of solving this is to rate-limit how often the auto-filler can trigger rebuilds? I just removed the autofiller from my network since it was too slow at creating lubricant cells anyway :-)

Final Checklist

NotAPenguin0 commented 6 months ago

I don't see a reason to use the fluid auto-filler instead of a fluid canner. Probably a better idea to deprecate or remove it entirely

boubou19 commented 6 months ago

Having several options to do the same thing is nice. Removing it from the pack is the easiest way of fixing it, but this should be considered only if the fix required for the fluid autofiller is too invasive/needs big structural code changes.

hucking commented 6 months ago

I'm also having issues with lag being caused by fluid crafts for example all crafts using my compact mk5s are lagging like crazy I'm not actually sure what is causing it... once the reactors finish crafting the lag is completely gone. image

hucking commented 6 months ago

actually yeah removing the auto filler got my tps back to normal instantly even during a craft lol

fluffle commented 6 months ago

I think there's probably a niche for the auto filler in the late EV-LuV kind of age, where you might conceivably be using it with AE to automate can recipes for singleblocks that can't consume multiple fluids. Or when you're grinding out the small percent chances for enough xenoxene petri dishes. Not having to create a bunch of patterns for your fluids is sort of nice.

I imagine anyone suffering from this problem is probably at a point where they can just whack down a PA with 64 high tier fluid canners in, though, so if there's not an easy fix maybe it's better to document the bad behaviour and move on :-)

hucking commented 6 months ago

Personally I never used the auto filler for any automation but when I needed to manually craft something or set up automation to be able to just pull out cells out of your AE is nice. I honestly do prefer having it in general than not having it but if it eats up half my tps it's a no brainer to throw it away lol