Terry J. Reedy added the comment:
I copied the example profile code at the top and bottom of test_get and nearly
all (7.155 / 7.210) of the time is in _socket.socket.connect, which takes .5
sec per call.
14 7.155 0.511 7.155 0.511 {method 'connect' of _socket.socket'
objects}
I am guessing that socket, and thence _socket, is imported in HTTPServer. I
tested whether this diff in class TestServerThread is responsible
- self.server = HTTPServer(('', 0), self.request_handler)
+ self.server = HTTPServer(('localhost', 0), self.request_handler)
but it is not. Anyone else have other ideas?
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue20155>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com