Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Perl CGI and SSI speed

by steveAZ98 (Monk)
on Jun 18, 2001 at 07:05 UTC ( [id://89221]=note: print w/replies, xml ) Need Help??


in reply to Perl CGI and SSI speed

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://89221]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (7)
As of 2024-03-28 12:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found