bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#42998: 27.1; gnutls-symmetric-encrypt slow when providing cipher as


From: Eli Zaretskii
Subject: bug#42998: 27.1; gnutls-symmetric-encrypt slow when providing cipher as symbol
Date: Mon, 24 Aug 2020 16:31:44 +0300

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Mon, 24 Aug 2020 15:01:01 +0200
> Cc: 42998@debbugs.gnu.org
> 
> Vasilij Schneidermann <mail@vasilij.de> writes:
> 
> > I'd consider either to
> > document this behavior or making the mapping more efficient, for example
> > by caching the cipher list instead of recomputing it over and over
> > again.
> 
> The following fixes the problem, but I'm not quite sure whether it's
> correct...  Is initialising a Lisp_Object to NULL something that's
> allowed over all platforms?

Since Lisp_Object is not really a pointer, at least not in all builds,
this might work, but is fragile, and thus not recommended.

> I can't initialise it to the more natural Qnil, since that's not a
> constant, C-wise.

Such initializations shall be done in the syms_of_* functions, in this
case syms_of_gnutls -- those run at build time, and are recorded in
the dumped memory.  yes, that means the static variable will not be
private to the function, but I don't think it's a problem.  I think
it'd also allow you to staticpro the variable only once.

Thanks.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]