You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a reason why list is being used and not a native queue like asyncio.Queue?
If there is a need of synchronous operation, we can use collections.deque.
The text was updated successfully, but these errors were encountered:
Checklist
master
.Issue
I noticed that
list
is being used for queue-based operations in a couple of places:uvicorn/uvicorn/middleware/wsgi.py
Line 98 in 3a5c3b8
uvicorn/uvicorn/protocols/http/httptools_impl.py
Line 77 in 3a5c3b8
These operations, therefore, incur O(n) memory movement costs:
uvicorn/uvicorn/middleware/wsgi.py
Line 131 in 3a5c3b8
uvicorn/uvicorn/protocols/http/httptools_impl.py
Line 262 in 3a5c3b8
Question
Is there a reason why
list
is being used and not a native queue like asyncio.Queue?If there is a need of synchronous operation, we can use collections.deque.
The text was updated successfully, but these errors were encountered: