-
-
Notifications
You must be signed in to change notification settings - Fork 650
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
EnhancedTermTypedCharSupport: store queued chars in a deque #11418
Comments
Before accepting a change like this I'd like to see it actually measured under standard and extreme conditions. IE prove that it doesn't make things worse. I agree, this should perform better, but good to know for sure it does in the cases that this code encounters. |
@codeofdusk are you still thinking implementing this makes sense? Or is the poerformance much better now? |
@codeofdusk that issue is closed, we welcome positive code refactors that increase maintainability |
Is your feature request related to a problem? Please describe.
Currently, the
EnhancedTermTypedCharSupport
class stores its queue of typed characters in a list. Per the Python docs:Describe the solution you'd like
Use a
deque
instead.pop
characters to be dispatched instead of iterating over the entire list and rebuilding it.Describe alternatives you've considered
Keep the current implementation: the number of queued characters is small and time/space savings are theoretical.
The text was updated successfully, but these errors were encountered: