Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Got a PHP performance tuning tip?

5:41 am on May 10, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

PHP performance tunning tips. Please add to the list.

1. Reduce the number of connections to the DB.
2. Use (for and while) loops wisely
3. Anybody?


8:21 am on May 30, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

arrays vs a number of variables to hold data? What is the speed difference?


4:23 pm on May 30, 2006 (gmt 0)

WebmasterWorld Administrator jatar_k is a WebmasterWorld Top Contributor of All Time 10+ Year Member

I think that would really depend on what you are doing with them. At some point in the eqation there would also be 'ease of use'.
5:17 pm on May 30, 2006 (gmt 0)

10+ Year Member

The biggest speedup I obtained was from reducing the number of "includes" and "requires".
Each one of these is a physical disk access, and whilst a good caching and optimizing module can help, I still realized huge parse time decreases by getting rid of as many of these as possible.

Far more significant than worrying about relatively inconsequential things like single vs double quotes for example.

5:20 pm on May 30, 2006 (gmt 0)

10+ Year Member

Next on my list would be optimizing your database - using indexes and making sure your queries use them. Benchmark long running queries to see if they can be rewritten. Never assume that even a relatively simple query can't be improved.

Turning on the query cache helps, too, if you are using MySQL, and making sure the database configuaration parameters are optimized for your particular situation.

4:29 pm on Jun 8, 2006 (gmt 0)

10+ Year Member

Is there any time savings with alternative syntax? Anyone done any testing? Is there a good site to see these type of test results?
This 35 message thread spans 2 pages: 35

Featured Threads

Hot Threads This Week

Hot Threads This Month