laziness, impatience, and hubris | |
PerlMonks |
Re: Perl CGI and SSI speedby steveAZ98 (Monk) |
on Jun 18, 2001 at 07:05 UTC ( [id://89221]=note: print w/replies, xml ) | Need Help?? |
All good questions:
1. Database accesses do slow down a script, DBI has a lot of overhead. You can increase your performance with a database specific driver (i.e. one written using the database api) but you'll loose portability. 2. In my opinion the slight overhead that modules incur is well worth the maintainability of the code, machine performance wise might not be the best solution, but manpower performance wise it is definitely worth it to use modules. 3. Apache and mod_perl cache perl modules, whether or not they are user created, a module is just a module. I beleive that scripts are even cached if they are run under Apache::Registry 4. OO code is usually a bit slower than procedural. I tend to make small scripts procedural and larger projects OO, although it sometimes just makes sense for the small scripts also. 5. Straight HTML is faster. Any other combinations you should benchmark yourself (since there are just way too many ways to combine perl and SSI to give a straight answer). If you run apache use ab, it's a great tool to help you figure out what is happening. Other notes. use the Benchmark module and Devel::DProf to see what really effects the performance of your scripts and ab (apache benchmark) for your web comparisons. HTH
In Section
Seekers of Perl Wisdom
|
|