On Tue, 2005-08-30 at 14:25 +1000, Badai Aqrandista wrote: > I have localized one subroutine that has been heavily called in the search > function. That should be the way to pick the candidate, shouldn't it?
What usually matters when working on speed is where the most wall clock time is being spent. However, rewriting sections in C gives the most benefit on subs that use the most CPU time rather than wall time. > I have never done this and I am worried that writing it in C would push the > project's deadline a little bit further. It probably will. It will also make your code harder to maintain, possibly introduce lots of new bugs, and maybe not help very much. Rewriting things in C is a last resort. If you must do it, try Inline::C. > Anyhow, I've decrease the MaxClients to 3 and it worked!!! The speed > significantly increases, from average of 110 sec/request to 85 sec/request. > But, that's not enough. I need less than 10 sec/request. Your requests take 110 seconds each? What is your application doing? That doesn't sound like something that could be cured by simple optimization. - Perrin