On Mon, Jul 11, 2011 at 02:29:25PM -0700, Steve Edwards wrote: > The second AGI, 'neutered-agi' is an AGI of 'production length' (around > 1,600 lines) and supporting access to a MySQL database. The AGI is of > 'production length' but still exits after reading the AGI environment > variables because we are measuring program startup time.
Perl's startup time also depends on the modules you load: The following is a simple loop that runs a perl program doing nothing (executing an empty statement) but firt loading a different set of modules for the task. The loop repeats it 1000 times: # No extra modules: $ time for i in `seq 1000`; do perl -e ''; done real 0m5.093s user 0m1.676s sys 0m2.524s # Asterisk::AGI: $ time for i in `seq 1000`; do perl -MAsterisk::AGI -e ''; done real 0m9.400s user 0m6.368s sys 0m2.060s # MySQL access: $ time for i in `seq 1000`; do perl -MDBI -MDBD::mysql -e ''; done real 0m40.964s user 0m33.122s sys 0m5.416s # Asterisk::AGI and MySQL access: $ time for i in `seq 1000`; do perl -MAsterisk::AGI -MDBI -MDBD::mysql -e ''; done real 0m45.898s user 0m36.798s sys 0m6.048s -- Tzafrir Cohen icq#16849755 jabber:tzafrir.co...@xorcom.com +972-50-7952406 mailto:tzafrir.co...@xorcom.com http://www.xorcom.com iax:gu...@local.xorcom.com/tzafrir -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users