-
Notifications
You must be signed in to change notification settings - Fork 326
Speedup ae2 stocking hatches #4009
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 1.20.1
Are you sure you want to change the base?
Conversation
|
Wait to merge until we get the OK from ghosti if it actually fixes the lag they cause |
|
why is |
possible nullpointer exception if the previous call returns null, but it shouldn't at that point. Regardless, as per the last commit we're rewriting it to use an ae2 storagemonitor service rather than just querying mainnet all the time |
src/main/java/com/gregtechceu/gtceu/api/misc/StockingHatchList.java
Outdated
Show resolved
Hide resolved
src/main/java/com/gregtechceu/gtceu/api/misc/StockingHatchList.java
Outdated
Show resolved
Hide resolved
src/main/java/com/gregtechceu/gtceu/api/misc/StockingHatchList.java
Outdated
Show resolved
Hide resolved
src/main/java/com/gregtechceu/gtceu/api/misc/StockingHatchList.java
Outdated
Show resolved
Hide resolved
src/main/java/com/gregtechceu/gtceu/api/misc/StockingHatchList.java
Outdated
Show resolved
Hide resolved
src/main/java/com/gregtechceu/gtceu/integration/ae2/machine/MEStockingBusPartMachine.java
Outdated
Show resolved
Hide resolved
|
|
||
| private void syncListToHandler() { | ||
| int index = 0; | ||
| for (var entry : topItems) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See prior comment - also can this code be deduplicated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not in a clean way I could find, because of the usage of the slots, the fact that both lists dont have a shared superclass, etc


What
Removes a redundant check in stocking hatches
Implementation Details
We no longer simulate extracting for every item in the system, as this is expensive, and instead only simulate the 16 items we pick. This does mean inaccessable items will show up there, but that's user error, and they will show up as 0 amount.
Outcome
no longer 130us/t for a single stocking hatch