1

Topic: Optimizing Performance ?

I am curious about what causes most performance overhead/drag in a script

1. Database queries
2. Templating
3. Includes
4. etc.

For example, very often something that could be done via templating could also be done via file includes instead. Which is going to cause the biggest performance hit.

Re: Optimizing Performance ?

I would guess that the database is the part of the script that slows down.. Or, what you do with the data that you fetch

3 (edited by Paul 2004-02-21 16:44)

Re: Optimizing Performance ?

That would explain the obsession amongst coders for reducing the number of queries used.

One thing I forgot to ask is what is worse for performance; a large include file where only some of the code is actually needed or several small includes where all the code in each file is actually used. In other  words, is the most crucial factor the size of the included file or the number of includes used.

Re: Optimizing Performance ?

There's no definitive answer to that question. It all depends on the system hosting the scripts. The only way to tell is to test (for example with apachebench).

"Programming is like sex: one mistake and you have to support it for the rest of your life."

5

Re: Optimizing Performance ?

Most the time I would say many includes it creates alot of over head.

A large function file or many small function files.  The large function site will be faster.