Skip to content

Add exponential backoff setting for retries when an extractor fails to extract or insert anything#276

Open
jpenilla wants to merge 2 commits intoDirewolf20-MC:mainfrom
jpenilla:exponential-backoff
Open

Add exponential backoff setting for retries when an extractor fails to extract or insert anything#276
jpenilla wants to merge 2 commits intoDirewolf20-MC:mainfrom
jpenilla:exponential-backoff

Conversation

@jpenilla
Copy link
Contributor

@jpenilla jpenilla commented Jul 15, 2024

In some cases we need to move large amounts of items/fluids/etc. very quickly, but only in bursts (not constantly/all the time).

By enabling backoff we can accomplish this with less of a tps hit on average.

I haven't added this to the GUI for energy extractors yet as external inventories/fluid containers tend to be much bigger lag contributors than energy, but if this concept is something the maintainers want to move forward with I can finish that TODO as well.

For reference, AE2 does something very similar with formation planes (albeit by default with no option), and I'm sure other mods also implement similar ideas.

In the following example, the item card is set to a maximum backoff of 2^3. This means that on each failure or success, the card will increment or decrement the power of 2 used between 0 (2^0 * 4, 4 ticks, normal delay) and 3 (2^3 * 4 ticks, or 32 ticks after 3 successive failures).
Screenshot 2024-07-17 at 6 28 11 PM

@jpenilla jpenilla force-pushed the exponential-backoff branch from 085d097 to 8c43865 Compare July 15, 2024 08:58
…o extract or insert anything

In some cases we need to move large amounts of items/fluids/etc. very quickly, but only in bursts (not constantly/all the time).

By enabling backoff we can accomplish this with less of a tps hit on average.
@jpenilla jpenilla force-pushed the exponential-backoff branch from 8c43865 to bcd0b73 Compare July 15, 2024 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant