Skip to content

Conversation

@vilgotf
Copy link
Member

@vilgotf vilgotf commented Dec 1, 2024

We're always calling clock_gettime() when acquiring a permit even if we've just done so already in when checking readiness. This is not a big deal performance wise, but it feels counterintuitive to not reuse already fetched resources as if the alrorithm required it (it does not).

@vilgotf vilgotf added c-gateway Affects the gateway crate t-refactor Refactors APIs or code. labels Dec 1, 2024
@vilgotf vilgotf merged commit 2099918 into main Dec 7, 2024
9 checks passed
@vilgotf vilgotf deleted the vilgotf/gateway-ratelimiterp1 branch December 7, 2024 07:36
viztea pushed a commit to eara-bot/twilight that referenced this pull request Feb 15, 2025
…s#2393)

We're always calling `clock_gettime()` when acquiring a permit even if
we've just done so already in when checking readiness. This is not a big
deal performance wise, but it feels counterintuitive to not reuse
already fetched resources as if the alrorithm required it (it does not).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c-gateway Affects the gateway crate t-refactor Refactors APIs or code.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants