[issue46750] some code paths in ssl and _socket still import idna unconditionally
Shivaram Lingamneni
report at bugs.python.org
Mon Feb 14 13:24:22 EST 2022
Shivaram Lingamneni <slingamn at cs.stanford.edu> added the comment:
Sorry, I should have been more clear: I am including the initial costs of importing stringprep and unicodedata. On my system:
$ python3 -c "import time; start = time.time(); r = 'a'.encode('idna'); elapsed = time.time() - start; print(elapsed)"
0.0053806304931640625
So the earlier measurement of 15 milliseconds was excessive (I'm not sure what happened) but it's the right order of magnitude: I can reproduce 5 milliseconds reliably.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46750>
_______________________________________
More information about the Python-bugs-list
mailing list