Skip to content
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

Dynamic timeout-poll #17

Open
pbrisbin opened this issue Nov 13, 2023 · 0 comments
Open

Dynamic timeout-poll #17

pbrisbin opened this issue Nov 13, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@pbrisbin
Copy link
Member

pbrisbin commented Nov 13, 2023

Some ideas for making our wait loops more efficient.

1- Decay strategy

In at least our own usage, it would be best if we polled with a longer timeout to start and then shortened it over time, as we get closer to an assumed completion of what we're waiting on. This shouldn't be too complex to implement, but we would have to decide how opinionated to be vs allowing user-control over how the poll duration decays over time -- since the best approach entirely depends on workload, I don't think we should be very opinionated.

2- min(timeout-poll, blockingLock.expiry)

When we're waiting on a lock, we know when it expires. If it expires sooner than our timeout-poll, we should only wait that long (maybe +1ms or something). There's no need to wait 5 seconds if we know the lock we're waiting for expires in 120ms.

@pbrisbin pbrisbin added the enhancement New feature or request label Nov 13, 2023
@github-project-automation github-project-automation bot moved this to 👜 To do in Open Source Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 👜 To do
Development

No branches or pull requests

1 participant