Skip to content
This repository has been archived by the owner on May 25, 2024. It is now read-only.

YOTTank performance refactor #255

Merged
merged 3 commits into from
May 10, 2024
Merged

Conversation

eigenraven
Copy link
Member

  • Remove all unnecessary BigInteger allocations where possible
  • Store the fluid types as FluidStacks instead of Strings, this reduces the constant lookups into the fluid registry
  • Cache the fluid tank info array
  • Big one: only update once per second (20 ticks) instead of every tick, the output fill rate has been bumped 20x to compensate - but bigger input hatches might be needed if they were barely keeping up before.

@eigenraven eigenraven requested a review from a team May 7, 2024 18:45
@eigenraven eigenraven self-assigned this May 7, 2024
Copy link

@OneEyeMaker OneEyeMaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job!

This PR needs excessive testing to check that moving to per-second ticking scheme doesn't bring any issues.

@Dream-Master Dream-Master merged commit c22df7b into master May 10, 2024
2 checks passed
@Dream-Master Dream-Master deleted the cleanup-yottank-bigint-usage branch May 10, 2024 08:37
Dream-Master pushed a commit that referenced this pull request May 19, 2024
* Clean up yottank biginteger handling code

* Only tick the tank once per second, adjust the output to match

* Clean up yottahatch and fix a couple of omissions in the tank

(cherry picked from commit c22df7b)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants