rascal icon indicating copy to clipboard operation
rascal copied to clipboard

perf(backoff): optimize linear backoff using closure

Open Ayoub-Mabrouk opened this issue 1 month ago • 1 comments

Remove lodash dependency for faster property access Pre-calculate range in closure to avoid repeated subtraction on each call Add early return optimization for constant values (min === max) -Use modern JS features (default parameters, arrow functions)

The range calculation is moved from the hot path (next() function) to the closure scope, ensuring it's computed only once when the backoff function is created rather than on every invocation

Ayoub-Mabrouk avatar Dec 10 '25 21:12 Ayoub-Mabrouk