in reply to CGI to Apache::Registry, or to mod_perl
Also, you might try reducing the number of print statements in your code. I think that perl's IO system has changed somewhat since I wrote Re: Speeding up commercial Web applications, but I think that the advice there is still good.
There are a few other optimizations that can improve print statements, but the improvements are small. Things to experiment with are:
Another mod_perl optimization is to move as much computation as possible to a BEGIN {} block, so it is only computed during the first run of your code. Similarly, put cleanup code in an END {} block.
It is easy to get confusing answers when profiling mod_perl. I use Time::HiRes and print the profiling information to STDERR. This is tedious but I suspect that the more deluxe profiling modules were not written with mod_perl in mind!
The ultimate test is load testing, which I do with a bunch of lwp GET requests running at the same time. With this I discover other Apache parameters to tune, such as the number of requests to service before restarting the http daemon. These server restarts require perl to reload the modules.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: CGI to Apache::Registry, or to mod_perl
by dd-b (Pilgrim) on Jan 17, 2004 at 18:47 UTC |