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
The UrlDispatcher currently has to do a linear search to dispatch urls which has an average time complexity of O(n). This means that urls that are registered first can be found faster than urls that are registered later.
Describe the bug
The UrlDispatcher currently has to do a linear search to dispatch urls which has an average time complexity of
O(n)
. This means that urls that are registered first can be found faster than urls that are registered later.To Reproduce
Results
This can be demonstrated with the following benchmark script
Expected behavior
Ideally the time complexity is at most
O(url_parts)
Logs/tracebacks
Python Version
n/a
aiohttp Version
master
multidict Version
n/a
yarl Version
n/a
OS
n/a
Related component
Server
Additional context
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: