NYCPHP Meetup

NYPHP.org

[nycphp-talk] question about pruning code

Eddie Haber php at haberco.com
Fri Aug 6 16:57:16 EDT 2004


I for one think code readability and organization are more important than
shaving one ten-thousandth of a second off your load time. Any compiled at
run-time language served over a network is going to have variable serve
times, the margin of which, is probably greater than the server load
incurred by an include statement.

Optimization and performance are important. And profiling is a necessity,
especially for spotting sluggish parts of an app. But I think people can
become overly consumed with performance.

Your best bet for performance might be to first look at code architecture.
And according to "extreme programming" you should profile first before
optimizing. See if it actually is those pesky "includes" or maybe a poorly
written function that's used 1,000 times during execution of your script.

I hope this doesn't sound persnickety, but if we start worrying about using
"includes" we'll never be able to write any serious PHP programs.

E



On 8/5/04 9:45 PM, "Mitch Pirtle" <mitchy at spacemonkeylabs.com> wrote:

> Hi list,
> 
> I'm looking at one particularly big script that I would like to prune to
> several includes, but wondering what performance issues would arise...
> 
> Basically I have one script that has become the 'controller' for the
> rest of the side (thanks to mod_rewrite), and I want to prune this
> initial file down so it is not such a big beast.  However I fear that
> performance could suffer as a result.
> 
> Any opinions on tackling such a problem?
> 
> -- Mitch
> 
> _______________________________________________
> New York PHP Talk
> Supporting AMP Technology (Apache/MySQL/PHP)
> http://lists.nyphp.org/mailman/listinfo/talk
> http://www.newyorkphp.org





More information about the talk mailing list