In some testing I did here (on solaris 7, version 5.42 of libwww) it seems that HTTP::Daemon::ClientConn takes more time to respond than it needs to. In particular, the send_response function ends up writting to its socket ($self) multiple times. When I change the code (in send_response, send_basic_header and send_status_line) to simply accumulate a single string of data and then print that to $self just once (rather than printing each bit as it is collected), I get a noticable speed-up. Running HTTP::Daemon on my desktop it changed from a 0.07 sec/message time to 0.023 sec/message (a C++ implimentation also to 0.023 sec/message on average). In this particular case, there was no real processing being done and the response messages were very simple. Even so, I was quite surprised that a relatively simple change could make the Perl version run about 3x faster (and basically the same speed as the C++ version). Doug .
