Expensive HTTPS startup on Win32?

Expensive HTTPS startup on Win32?

am 22.05.2007 23:11:34 von david

LWP Folks,

I'm seeing about 1-2 CPU-seconds of processing whenever I perform the
first HTTPS operation of any sort with LWP on Win32. I see the CPU
usage shoot up to 100% right after the SYN-ACK is sent from the Perl
client, and stay there for about two seconds, then drop to zero as the
client part of the SSL handshake is performed. This is not seen in
subsequent HTTPS requests from the client.

I'm presuming there's some expensive initialization that the client
SSL libraries are doing, such as preparing local randomness,
generating temporary keys, or somesuch. This is probably a well-known
issue, but I wasn't able to figure out how to best find an answer.

This is with Crypt::SSLeay version 0.53, released 2006-12-26 and the
most recent LWP from ActiveState for Perl 5.8.

Is there anything I can do to "cache" this work to make startup
faster? Or must the first HTTPS operation always be slow?


David Weekly
PBwiki