-
-
Notifications
You must be signed in to change notification settings - Fork 7k
pick deque instead of list #7849
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
pick deque instead of list #7849
Conversation
Sure, makes sense. |
Wondering what the likelihood is of us introducing a breakage for any folks with a custom throttling implementation that's currently assuming |
Hi @tomchristie , Regarding custom throttling implementation, Technically, Besides, I verified Please kindly let me know what you think. |
Hi @tomchristie |
Okay, let's go with it. |
This reverts commit ebcb8d5.
Co-authored-by: Jack Zhang <jack.zhang@aspiraconnect.com>
This reverts commit ebcb8d5.
Description
Currently, a list object,
self.history
, is used for storing request history.self.history.insert(0, self.now)
in functionthrottle_success
andself.history.pop()
in functionallow_request
, are used to insert and remove request history, respectively.If deque is picked, we would have fast insertion and removal at both ends.
Please see the information below for more details about deque.
Would it be possible to review and approve this change?