[gnutls-devel] Automatic library initialization

Jeremy Harris jgh at wizmail.org
Mon Nov 16 12:27:23 CET 2015

On 11/11/15 10:33, Nikos Mavrogiannopoulos wrote:
> On Tue, Nov 10, 2015 at 4:23 PM, Tim Ruehsen <tim.ruehsen at gmx.de> wrote:
>> an executable, dynamically linked with GnuTLS, automatically calls
>> gnutls_global_init(). And thus (in my case) eats up 60x more CPU cycles than
>> needed.
>> The executable only needs GnuTLS under some conditions (TLS connection
>> requested). In this case it 'manually' calls gnutls_global_init().
> There is the undocumented env variable GNUTLS_NO_EXPLICIT_INIT. If you
> set it to 1 you disable the use of constructor and destructors to load
> gnutls.

Question: in a forking server will the initialisation cost be paid only
at service start, and not per-worker?  Is this a valid model for GnuTLS?

More information about the Gnutls-devel mailing list