24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-06-12 21:52:07 +02:00
xmpp.chapril.org-ejabberd/src/tls
Janusz Dziemidowicz c4f9a050c9 Decrease CPU usage caused by tls:send with large data.
Sending one large chunk of data with tls:send eats lots of
CPU power and blocks whole Erlang emulator. This is caused by the
fact that encrypted output is read from memory BIO in 1k chunks.
Memory BIO, after reading data, shifts the remaining part.
If large chunks of data (few MB) is sent and then read in 1k
chunks, then a _lot_ of shifting is performed eating CPU.

The solution is to simply allocate binary of the needed size
(amount of data in memory BIO can be retrieved with
BIO_ctrl_pending) and then issue only one read that reads the
whole data.
2011-09-25 00:23:31 +02:00
..
Makefile.in Make MD2 autodetected (EJAB-1285) 2010-08-07 22:04:57 +10:00
Makefile.win32 New OpenSSL functions wrapper: sha224/1, sha256/1, sha384/1, sha512/1 2010-06-22 02:30:16 +10:00
sha_drv.c update copyright up to 2011 2011-02-14 13:50:55 +01:00
stdint.h * src/tls/Makefile.win32: Windows compilation support. 2009-01-13 16:33:17 +00:00
tls_drv.c Decrease CPU usage caused by tls:send with large data. 2011-09-25 00:23:31 +02:00
tls.erl Change argument of open_port/2 to string in order to shut up the dialyzer 2011-09-05 15:28:14 +10:00