in reply to mod_perl vs CGI: benchmarks and code
It's a no-brainer, if you're worried mainly about performance. Basic story: mod_perl embeds a perl interpreter in Apache. No starting up a separate perl interpreter when you start a CGI script! Secondly, Apache::DBI allows database connection pooling, and pretty intelligently. It's a *big* speed gain, but there is increased memory usage.
If you code cleanly, and follow the guidelines you've already read, you shouldn't have much of a problem. Eventually, the thing to do is move away from thinking in terms of CGI scripts and writing mod_perl handlers; then, basically, you've got a big suite of Perl apps that groks HTTP ... mondo powerful. Why, you could even write a great website around that sort of technology!
perl -e 'print "How sweet does a rose smell? "; chomp ($n = <STDIN>); +$rose = "smells sweet to degree $n"; *other_name = *rose; print "$oth +er_name\n"'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: mod_perl vs CGI: benchmarks and code
by Anonymous Monk on Jan 02, 2010 at 22:11 UTC | |
by ikegami (Patriarch) on Jan 03, 2010 at 00:36 UTC | |
by Your Mother (Archbishop) on Jan 02, 2010 at 22:29 UTC |