On Wed, 2005-08-17 at 09:23 +1000, Badai Aqrandista wrote:
> I got the previous output because I put in the debugger initialization...

Was the previous output sorted with the -r flag though?  It just seems
so unlikely that Params::Validate would take significant time.

If it was sorted with -r, it looks like your use of memcached is working
against you.  Maybe you have a slow network connection to the memcached
server, or are just storing too much in it.  I'd suggest you look into
using a local cache instead, like Cache::FastMmap.  This will be faster,
although the cache will not be shared between machines.

> Without initialization (Apache::DB->init)

No point in looking at that.  It's missing most of your code.

> How should I interpret these outputs and what should I do about it to 
> improve my app's speed? This is the first time for me to optimize a large 
> perl codebase... So I need a bit of guidance here...

There's no trick, it's the same as in any language: find out what the
slow parts are by using a profiler and tinker with them until they are
faster.

You can look at the tuning information on http://modperlbook.org/ for
some advice as well.  And don't forget that there is a profiler for DBI
queries that comes with DBI.

- Perrin

Reply via email to