help-libtasn1
[Top][All Lists]
Advanced

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

Re: [PATCH] cleanup _asn1_copy_structure3


From: Nikos Mavrogiannopoulos
Subject: Re: [PATCH] cleanup _asn1_copy_structure3
Date: Fri, 7 Sep 2012 16:29:47 +0200

On Wed, Sep 5, 2012 at 1:13 PM, Nikos Mavrogiannopoulos <address@hidden> wrote:

> gnutls has certtool as well, but I don't think that this approach is
> any easier than optimizing libtasn1. The simpler way without radical
> changes in certificate verification,  would need to introduce a
> certificate cache, in effect storing the libtasn1 tree and restoring
> it back. Still you'd have to optimize the tree creation/copy etc. I
> think that the way that is beneficial for all use cases is to optimize
> tree creation and copy in libtasn1 anyway and avoid any caching. I'll
> add it in my todo list, but unfortunately currently that doesn't mean
> much as I'm busy with other things.

Btw. I noticed that samba's talloc has a talloc using a pool. Using
that in libtasn1 could have the following immediate effects:
* No memory leaks once a structure is deallocated
* A single malloc (or at least fewer) per structure

In general talloc() should be a bit slower than plain malloc, but I
believe that pooled version could have an impact in this case. I'll
try to test it this or next weekend.

regards,
Nikos



reply via email to

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