Re: [asterisk-users] Benchmarking AGI performance in C, PHP, and Perl

2011-07-13 Thread Benny Amorsen
Kevin P. Fleming kpflem...@digium.com writes: OT: Take a look at 'systemd'; this is exactly what's happening there, and Fedora is likely to incorporate it into Fedora 16, and it will make its way into other distros after that. It was incorporated into Fedora 14, and it is the default in

Re: [asterisk-users] Benchmarking AGI performance in C, PHP, and Perl

2011-07-12 Thread Tzafrir Cohen
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

Re: [asterisk-users] Benchmarking AGI performance in C, PHP, and Perl

2011-07-12 Thread Matthew J. Roth
Steve Edwards wrote: Also they tend to be used more by 'non-programmers' who get away with 'stupid' stuff like calling out to system() and piping a bunch of commands together because they don't know how to use the language properly :) I'm not disparaging Perl programmers or the language.

Re: [asterisk-users] Benchmarking AGI performance in C, PHP, and Perl

2011-07-12 Thread Danny Nicholas
] On Behalf Of Matt Riddell Sent: Monday, July 11, 2011 5:07 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Benchmarking AGI performance in C, PHP, and Perl On 12/07/11 9:29 AM, Steve Edwards wrote: Many times, I've made the statement that you can execute

Re: [asterisk-users] Benchmarking AGI performance in C, PHP, and Perl

2011-07-12 Thread Kevin P. Fleming
On 07/12/2011 09:33 AM, Matthew J. Roth wrote: Just think how fast Linux would boot if all of the init scripts were rewritten in C and compiled (they probably have some pipes that could be removed, too!!). Of course, it's pretty nice to be able to easily read and modify them, but execution

Re: [asterisk-users] Benchmarking AGI performance in C, PHP, and Perl

2011-07-12 Thread Tzafrir Cohen
On Tue, Jul 12, 2011 at 10:06:12AM -0500, Kevin P. Fleming wrote: On 07/12/2011 09:33 AM, Matthew J. Roth wrote: Just think how fast Linux would boot if all of the init scripts were rewritten in C and compiled (they probably have some pipes that could be removed, too!!). Of course, it's

Re: [asterisk-users] Benchmarking AGI performance in C, PHP, and Perl

2011-07-12 Thread Gordon Henderson
On Tue, 12 Jul 2011, Matthew J. Roth wrote: Just think how fast Linux would boot if all of the init scripts were rewritten in C and compiled (they probably have some pipes that could be removed, too!!). Of course, it's pretty nice to be able to easily read and modify them, but execution time

Re: [asterisk-users] Benchmarking AGI performance in C, PHP, and Perl

2011-07-12 Thread Matthew J. Roth
Tzafrir Cohen wrote: Well, there are a number of separate optimizations in systemd: 1. Delayed loading of services (or even not loading them at all, if not needed. E.g.: don't load CUPS if nobody needs it. 2. Paralelized loading of services (though there have been other

Re: [asterisk-users] Benchmarking AGI performance in C, PHP, and Perl

2011-07-12 Thread Steve Edwards
On Tue, 12 Jul 2011, Matthew J. Roth wrote: I recognized the code you posted. It's mine: Thank goodness you didn't try to embarrass me. Thank you for acknowledging that it was not my intent. You just used my code as an example of how a non-programmer would use a language, called piping

Re: [asterisk-users] Benchmarking AGI performance in C, PHP, and Perl

2011-07-12 Thread Matthew J. Roth
Steve, Apology accepted. As I said in the original post, I hold you in high regard so your criticism was hard to take. I still think that the trade- off between readability and optimization is up for debate, but it's certainly nothing to hold a grudge over. I can tell you one thing for

Re: [asterisk-users] Benchmarking AGI performance in C, PHP, and Perl

2011-07-12 Thread Tzafrir Cohen
On Mon, Jul 11, 2011 at 06:45:08PM -0700, Steve Edwards wrote: Also they tend to be used more by 'non-programmers' who get away with 'stupid' stuff like calling out to system() and piping a bunch of commands together because they don't know how to use the language properly :) On Mon, 11

Re: [asterisk-users] Benchmarking AGI performance in C, PHP, and Perl

2011-07-12 Thread Steve Edwards
On Mon, Jul 11, 2011 at 06:45:08PM -0700, Steve Edwards wrote: while read line; do epoch=`echo $line | cut -d '|' -f 1` if [ $epoch -ge $start_epoch -a $epoch -le $end_epoch ]; then echo $line fi done /var/log/asterisk/queue_log [snipping snippy comments about improving the

[asterisk-users] Benchmarking AGI performance in C, PHP, and Perl

2011-07-11 Thread Steve Edwards
Many times, I've made the statement that you can execute hundreds of AGIs written in C in the time it takes to load an interpreter and parse a script written in PHP or Perl. Recently, a Doubting Thomas asked me to substantiate my claim. I suspect nobody has made the effort to implement an AGI

Re: [asterisk-users] Benchmarking AGI performance in C, PHP, and Perl

2011-07-11 Thread Matt Riddell
On 12/07/11 9:29 AM, Steve Edwards wrote: Many times, I've made the statement that you can execute hundreds of AGIs written in C in the time it takes to load an interpreter and parse a script written in PHP or Perl. It would be interesting to see the same types of tests run against fast-agi -

Re: [asterisk-users] Benchmarking AGI performance in C, PHP, and Perl

2011-07-11 Thread Steve Edwards
On 12/07/11 9:29 AM, Steve Edwards wrote: Many times, I've made the statement that you can execute hundreds of AGIs written in C in the time it takes to load an interpreter and parse a script written in PHP or Perl. Well, now that I know better, let's not perpetuate an ancient claim.

Re: [asterisk-users] Benchmarking AGI performance in C, PHP, and Perl

2011-07-11 Thread cbul...@gmail.com
Also they tend to be used more by 'non-programmers' who get away with 'stupid' stuff like calling out to system() and piping a bunch of commands together because they don't know how to use the language properly :) I understand your point but I don't share it There are a lot

Re: [asterisk-users] Benchmarking AGI performance in C, PHP, and Perl

2011-07-11 Thread David Backeberg
On Mon, Jul 11, 2011 at 5:29 PM, Steve Edwards asterisk@sedwards.com wrote: Many times, I've made the statement that you can execute hundreds of AGIs written in C in the time it takes to load an interpreter and parse a script written in PHP or Perl. I've truly enjoyed this thread. And

Re: [asterisk-users] Benchmarking AGI performance in C, PHP, and Perl

2011-07-11 Thread Vincent Sweeney
On 11/07/11 23:42, Steve Edwards wrote: On 12/07/11 9:29 AM, Steve Edwards wrote: Many times, I've made the statement that you can execute hundreds of AGIs written in C in the time it takes to load an interpreter and parse a script written in PHP or Perl. Well, now that I know better,

Re: [asterisk-users] Benchmarking AGI performance in C, PHP, and Perl

2011-07-11 Thread Steve Edwards
Also they tend to be used more by 'non-programmers' who get away with 'stupid' stuff like calling out to system() and piping a bunch of commands together because they don't know how to use the language properly :) On Mon, 11 Jul 2011, cbul...@gmail.com wrote: I understand your point but I

Re: [asterisk-users] Benchmarking AGI performance in C, PHP, and Perl

2011-07-11 Thread Steve Edwards
On Mon, Jul 11, 2011 at 5:29 PM, Steve Edwards asterisk@sedwards.com wrote: Many times, I've made the statement that you can execute hundreds of AGIs written in C in the time it takes to load an interpreter and parse a script written in PHP or Perl. I can see I'm going to spend the rest

Re: [asterisk-users] Benchmarking AGI performance in C, PHP, and Perl

2011-07-11 Thread Steve Edwards
On 11/07/11 23:42, Steve Edwards wrote: 'Standalone' AGIs still have advantages in lower complexity and less impact on failure. If a bug takes out your fastagi daemon it can affect all calls. On Tue, 12 Jul 2011, Vincent Sweeney wrote: I'm pretty sure if you have a bug in your AGI code