]> git.kaiwu.me - nginx.git/commit
SSL: speedup loading of configs with many ssl servers.
authorMaxim Dounin <mdounin@mdounin.ru>
Wed, 9 Jan 2013 14:11:48 +0000 (14:11 +0000)
committerMaxim Dounin <mdounin@mdounin.ru>
Wed, 9 Jan 2013 14:11:48 +0000 (14:11 +0000)
commit041449a3d34b738a3a5d9012461e2a06f98f7b24
tree57785f758938ec6824b3de0954ade09ca882cabb
parenta6ea2f8f4813efd6606d5d31481ae613cb114e76
SSL: speedup loading of configs with many ssl servers.

The patch saves one EC_KEY_generate_key() call per server{} block by
informing OpenSSL about SSL_OP_SINGLE_ECDH_USE we are going to use before
the SSL_CTX_set_tmp_ecdh() call.

For a configuration file with 10k simple server{} blocks with SSL enabled
this change reduces startup time from 18s to 5s on a slow test box here.
src/event/ngx_event_openssl.c