-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Analyze additional places where there is timer handle churn #8613
Comments
For this one, I just figured it'd be a one-line fix to add an if statement in, which could reduce the impact even if it's not hit often. |
This one is heavy. Should make it a priority. It might just be because of the 2.0 second interval |
The cleanup_closed case is because its every 2.0. HA changed it to 60.0 but there are lot of places where libs don't use HA's subclassed connector so we still see it there. 2.0s might be too frequent, but I'm not sure how safe it is to increase for the generate use case. |
Testing a solution in #8662 |
I didn't see client_proto.py: Its going to churn if there is a read timeout but that seems like its going to be a more rare case |
As long as it's not affected by sock_connect timeout, which we're trying to add by default: https://github.com/aio-libs/aiohttp/pull/7368/files#diff-f334e752b4894ef951105572ab8b195aeb8db90eb6e48b1dfbd9a01da4c854f5R166 |
Looks like that won't affect it AFAICT |
@bdraco Probably a good idea to edit the original message into a checklist, so we can which have already been done? |
The only thing left of substance is cleanup closed. It probably doesn't need to run every 2s. Home Assistant overrides the value to every 60s and that has worked out fine |
It looks like we can get rid of cleanup closed (conditionally) now that its fixed upstream in cpython see #9590 That was the last one here |
I think it might be worth doing. It fires far less often than websockets though. Need to do some more profiling with this one.
This is a rare case where its almost never rescheduled since we expect it to respond right away or be closed. Its probably not worth optimizing.
This one doesn't seem to get rescheduled frequently when I looked at the profile.
cleanup_closed could use some improvements. Something to investigate for sure.
That looks like a good opportunity to cleanup there.
Originally posted by @bdraco in #8608 (comment)
The text was updated successfully, but these errors were encountered: