[Top][All Lists]
[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: |
Sun, 9 Sep 2012 01:52:04 +0200 |
On Fri, Sep 7, 2012 at 4:29 PM, Nikos Mavrogiannopoulos <address@hidden> wrote:
> 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.
It seems that talloc either with pools or not is much slower than the
current code. However, a quick optimization that reduced that
allocations by almost a third (2000 allocations for a certificate
instead of 3000), is to make the node name a fixed string. This also
increased the performance of the library in decoding by almost 20%.
However, I've noticed that for some reason the node_asn structure is
exported in libtasn1.h, something that doesn't prevents to make this
change (at least directly). This is quite surprizing as this structure
was definitely not intended to be exported. Given that this node_asn
isn't documented anywhere, are there actually any projects using it?
If yes, why is that - can we emulate the use case with a new function?
I think future versions of libtasn1 should drop this structure from
the exported API to allow the library to be rewritten and keep the
same API.
regards,
Nikos
- [PATCH] cleanup _asn1_copy_structure3, Tim Ruehsen, 2012/09/01
- Re: [PATCH] cleanup _asn1_copy_structure3, Nikos Mavrogiannopoulos, 2012/09/04
- Re: [PATCH] cleanup _asn1_copy_structure3, Tim Ruehsen, 2012/09/04
- Re: [PATCH] cleanup _asn1_copy_structure3, Nikos Mavrogiannopoulos, 2012/09/05
- Re: [PATCH] cleanup _asn1_copy_structure3, Tim Ruehsen, 2012/09/04
- Re: [PATCH] cleanup _asn1_copy_structure3, Simon Josefsson, 2012/09/05
- Re: [PATCH] cleanup _asn1_copy_structure3, Tim Ruehsen, 2012/09/05
- Re: [PATCH] cleanup _asn1_copy_structure3, Simon Josefsson, 2012/09/06
- Re: [PATCH] cleanup _asn1_copy_structure3, Nikos Mavrogiannopoulos, 2012/09/05
- Re: [PATCH] cleanup _asn1_copy_structure3, Nikos Mavrogiannopoulos, 2012/09/08
- Re: [PATCH] cleanup _asn1_copy_structure3,
Nikos Mavrogiannopoulos <=
- Re: [PATCH] cleanup _asn1_copy_structure3, Simon Josefsson, 2012/09/10
- Re: [PATCH] cleanup _asn1_copy_structure3, Nikos Mavrogiannopoulos, 2012/09/11
- Re: [PATCH] cleanup _asn1_copy_structure3, Simon Josefsson, 2012/09/12
- Re: [PATCH] cleanup _asn1_copy_structure3, Nikos Mavrogiannopoulos, 2012/09/13
- Re: [PATCH] cleanup _asn1_copy_structure3, Simon Josefsson, 2012/09/13
- Re: [PATCH] cleanup _asn1_copy_structure3, Simon Josefsson, 2012/09/13
- Re: [PATCH] cleanup _asn1_copy_structure3, Nikos Mavrogiannopoulos, 2012/09/14