help-libtasn1
[Top][All Lists]
Advanced

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

Re: Efficiency of libtasn1?


From: Nikos Mavrogiannopoulos
Subject: Re: Efficiency of libtasn1?
Date: Tue, 26 Jan 2016 18:09:11 +0100

On Tue, Jan 26, 2016 at 1:08 PM, Rick van Rein <address@hidden> wrote:
> Hello,
> I've recently seen how libtasn1 works, and it seems to be a useful
> tool.  What I don't understand is how efficient it works internally?  It
> looks like it allocates lots of pieces of memory, and that might slow
> down its performance in comparison to more dedicated (protocol-specific)
> alternatives.  Am I mistaken?

That is true. For simple small structures a custom parser (e.g., the
one included in nettle) would be much more efficient. Where libtasn1's
power comes is when you have an enormous number of overcomplicated
structures. Said that, allocation is not very expensive with modern
libc's and my experiments replacing malloc with talloc_pool() in
libtasn1, showed a slow down instead of speed up. Thus this part
should could not be significantly optimized.

> If it is sufficiently efficient for processing of high-bandwidth
> traffic, it might be interesting to implement an LDAP server that can
> have plugins, in a similar fashion as libevtp.  Although OpenLDAP is
> very flexible towards admins, it is not very friendly to developers who
> want to plugin a subtree with special, dynamic behaviour.

I think the only way to know whether libtasn1 would add significant
overhead to your app is to benchmark it. In TLS connections the
libtasn1 part is not a significant overhead.

regards,
Nikos



reply via email to

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