ext Sagar R. Shah ([EMAIL PROTECTED]) wrote:
> 
> I decided to investigate further and profiled a script that obtained all
> the LDAP attributes for a specific userid 500 times. Here's the profiler
> output:
> 
> $ dprofpp tmon.out
> Total Elapsed Time = 27.01739 Seconds
>   User+System Time = 20.43654 Seconds
> Exclusive Times
> %Time ExclSec CumulS #Calls sec/call Csec/c  Name
>  27.7   5.668 55.339  13503   0.0004 0.0041  Convert::ASN1::_decode
>  24.6   5.046  4.818  29009   0.0002 0.0002  Convert::ASN1::_decode_tl
>  6.94   1.418 44.101  12502   0.0001 0.0035   
 
> Convert::ASN1 - or at least the way Net::LDAP uses Convert::ASN1  
> seems to
> be the "problem".

Convert::ASN1 was written by Graham, for the specific purpose of allowing
Net::LDAP to be a "pure perl" module, afaik. Correct me if I'm off track
here.

The pure perl ASN.1 converter is very slow, as you have seen, but it is
really useful in many cases.

For all applications, you have to decide what is the appropriate language to
use based on your performance needs, etc. If you are regularly querying 10k
entries for mailing list traffic, then of course it makes sense to code this
functionality in C. I find that for 9 out of 10 cases, Net::LDAP performance
is good enough.

BR,
Mike

Reply via email to