We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
aiohttp/aiohttp/client_reqrep.py
Line 154 in e3b1011
We have to hash the ConnectionKey quite a bit.
ConnectionKey
On 3.x its a attrs with the hash cached
On master its a dataclass no cache
The text was updated successfully, but these errors were encountered:
Looks like switching it to a NamedTuple will speed it up since the hashing can happen all in native code. Sadly its not cached though
Sorry, something went wrong.
Performance regressed in #5284
connect with attrs
connect with namedtuple
Speed up the ConnectionKey
a2c1721
A large part of the connection management is constructing, hashing and comparing the connection key For additional details see #9364 To speed this up, ConnectionKey is now a NamedTuple which allows all the __hash__ and __eq__ operations to happen in native code. https://github.com/python/cpython/blob/133e929a791d209b578b4822a7a07f4570b3803b/Objects/tupleobject.c#L319 The construction of the object is a bit faster by calling the yarl URL methods directly
Successfully merging a pull request may close this issue.
aiohttp/aiohttp/client_reqrep.py
Line 154 in e3b1011
We have to hash the
ConnectionKey
quite a bit.On 3.x its a attrs with the hash cached
On master its a dataclass no cache
The text was updated successfully, but these errors were encountered: