From: Graham B. <gb...@po...> - 2000-07-27 10:10:21
|
On Thu, Jul 27, 2000 at 10:44:38AM +0100, John Berthels wrote: > > > For what it is worth, I don't find Net::LDAP to be unusably slow - the > > nice API and the portability make up for a lot. > > Ditto. I find that the startup time kills perceived performance for > one-shot scripts, but once running it is fine. Whether or not this is a > problem depends, of course, on your intended application. Hopefully one day we might get good byte code in perl and that might help a lot. This may be a thing for perl6 though. > I posted some numbers on this some time ago which hinted that Net::LDAP > was significantly slower than other perl modules to start up - but the > problem is to find 'comparable' modules. It is slower than Net::SMTP - but > that is a lot simpler. It is slower than Tk - but Graham pointed out that > that defers loading of code until it is used, i.e. you take the hit later > in the script. It might be good to have a page on the web-site about performance as it seems an FAQ (almost) but the answer is too long to go into an FAQ document IMO. > Would there be any value in deferring some Net::LDAP module loading until > it was needed or are we already as lean as we could get in that area? > (sorry - being lazy and not checking). Net::LDAP already does this to some extent. But I think one of the big startup costs is that Convert::ASN1 must parse the ASN.1 for the protocol. gbarr@chipper:~/src/ldap > time perl -Ilib -e0 perl -Ilib -e0 0.00s user 0.00s system 0% cpu 0.000 total gbarr@chipper:~/src/ldap > time perl -Ilib -MNet::LDAP -e0 perl -Ilib -MNet::LDAP -e0 0.38s user 0.00s system 64% cpu 0.593 total gbarr@chipper:~/src/ldap > time perl -Ilib -MNet::LDAP::ASN -e0 perl -Ilib -MNet::LDAP::ASN -e0 0.25s user 0.00s system 32% cpu 0.763 total As you can see it is a large % of the load time. It should be possible to just parse this on install and dump it to a file. Graham. |