Closed
Description
- uvloop version: 0.8.0
- Python version: 3.5
- Platform: Debian GNU/Linux testing
- Can you reproduce the bug with
PYTHONASYNCIODEBUG
in env?: I don't know
Commit 1d5ae0b introduces IDNA encoding. While this is a good solution for FQDN hostnames, this is really a performance killer when sending a lot of small packets using lots of IP address (use case in boramalper/magnetico#92). On my CPU, the IDNA encoding is taking ~5% of the whole program execution, and more than 75% of the sendto
method call.
The main issue here is that the sendto
call is done with address given with the call to datagram_received
, so uvloop
should be already aware that the hostname is an IP address.
I guess that datagram_received
cannot return an encoded hostname, but the idea is here.
Metadata
Metadata
Assignees
Labels
No labels