From: John B. <joh...@ne...> - 2001-07-02 14:45:21
|
> The reason is simple: Net::LDAP is a lot of pure perl code. This takes awhile > for Perl to compile. The only way around this is to utilize a caching > mechanism such as FastCGI or mod_perl. Those sorts of mechanisms should work. There is an additional reason why this step is slow, however. At module load time, the textual representation of the ASN.1 (Net/LDAP/ASN.pm) is parsed into a memory representation needed by Convert::ASN1 - this was the single biggest time user when I looked at this a while back. I got as far as putting together dump/restore methods for Convert::ASN1 which would effectively save the results of this parsing effort (since at the time I cared about startup time) and got some significant (to me) speedups, but the opinion on the list was that it was really only of use in a CGI environment, where solutions such as those you have described are more effective anyway. As an argument against "but it doesn't hurt, why not add it?" there is the effort of maintaining the code, which as anyone who has used or updated the problematic stuff I left behind in Net::LDAP::Schema.pm can tell you is not to be ignored :-) If you have real problems getting the mod_perl etc to work for you we could have another discussion on the list about this - I might even still have the patch around in a dusty corner somewhere. regards, jb |