1. 14 Feb, 2015 5 commits
  2. 13 Feb, 2015 2 commits
  3. 12 Feb, 2015 1 commit
  4. 11 Feb, 2015 3 commits
  5. 10 Feb, 2015 4 commits
  6. 09 Feb, 2015 2 commits
  7. 08 Feb, 2015 4 commits
  8. 07 Feb, 2015 3 commits
  9. 06 Feb, 2015 8 commits
  10. 05 Feb, 2015 6 commits
  11. 04 Feb, 2015 2 commits
    • Victor Stinner's avatar
    • Victor Stinner's avatar
      asyncio: Only call _check_resolved_address() in debug mode · 2fc23130
      Victor Stinner authored
      * _check_resolved_address() is implemented with getaddrinfo() which is slow
      * If available, use socket.inet_pton() instead of socket.getaddrinfo(), because
        it is much faster
      
      Microbenchmark (timeit) on Fedora 21 (Python 3.4, Linux 3.17, glibc 2.20) to
      validate the IPV4 address "127.0.0.1" or the IPv6 address "::1":
      
      * getaddrinfo() 10.4 usec per loop
      * inet_pton(): 0.285 usec per loop
      
      On glibc older than 2.14, getaddrinfo() always requests the list of all local
      IP addresses to the kernel (using a NETLINK socket). getaddrinfo() has other
      known issues, it's better to avoid it when it is possible.
      2fc23130