[issue46824] use AI_NUMERICHOST | AI_NUMERICSERV to skip getaddrinfo thread in asyncio

2022-03-18 Thread Ben Darnell
Ben Darnell added the comment: On MacOS in 2015, getaddrinfo was found to be much slower than inet_pton. Unless that's changed, this patch would be a performance regression on that platform. Data and benchmark script in https://groups.google.com/g/python-tulip/c/-SFI8kkQEj4/m/m1-oCMSABgAJ -

[issue46824] use AI_NUMERICHOST | AI_NUMERICSERV to skip getaddrinfo thread in asyncio

2022-03-18 Thread Ben Darnell
Ben Darnell added the comment: To summarize the justification, this patch does two things: it moves an optimization from create_connection to getaddrinfo, which makes it apply to more callers (including Tornado), and it makes the code simpler and less redundant (net reduction of 47 non-test

[issue46824] use AI_NUMERICHOST | AI_NUMERICSERV to skip getaddrinfo thread in asyncio

2022-02-22 Thread Thomas Grainger
Thomas Grainger added the comment: hello, it's actually a bit of a round about context, but it was brought up on a tornado issue where I was attempting to port the asyncio optimization to tornado: https://github.com/tornadoweb/tornado/issues/3113#issuecomment-1041019287 I think it would be

[issue46824] use AI_NUMERICHOST | AI_NUMERICSERV to skip getaddrinfo thread in asyncio

2022-02-22 Thread Andrew Svetlov
Andrew Svetlov added the comment: Could you provide more context for the proposed change? -- ___ Python tracker ___ ___ Python-bugs

[issue46824] use AI_NUMERICHOST | AI_NUMERICSERV to skip getaddrinfo thread in asyncio

2022-02-22 Thread Thomas Grainger
Change by Thomas Grainger : -- keywords: +patch pull_requests: +29627 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31497 ___ Python tracker ___

[issue46824] use AI_NUMERICHOST | AI_NUMERICSERV to skip getaddrinfo thread in asyncio

2022-02-22 Thread Thomas Grainger
New submission from Thomas Grainger : now that the getaddrinfo lock has been removed on all platforms the numeric only host resolve in asyncio could be moved back into BaseEventLoop.getaddrinfo -- components: asyncio messages: 413699 nosy: asvetlov, graingert, yselivanov priority: norm