Hey all!
I've been searching around the web for ways to make PHP Scripts run faster with less strain on the server. Unfortunately, good advice is not always easy to find and many tips are contradicting. Some say echo() is slow, others say to just use single quotes... What's right in your opinion and/or experience? Are there any definite do s or don't s?
Thanks for sharing.
Making PHP Scripts Faster and Less DemandingWhat are your ways to making the scripts faster and easier on the serv
Page 1 of 1
3 Replies - 1019 Views - Last Post: 11 January 2010 - 02:39 PM
Replies To: Making PHP Scripts Faster and Less Demanding
#2
Re: Making PHP Scripts Faster and Less Demanding
Posted 10 January 2010 - 09:05 PM
echo, single quotes, etc...not a big deal in the greater scheme of things. You're talking about premature optimization for the most part.
Bad database design, inefficient queries, lack of and/or improper database indexes...those are the things that bring a server down under load.
Bad database design, inefficient queries, lack of and/or improper database indexes...those are the things that bring a server down under load.
#3
Re: Making PHP Scripts Faster and Less Demanding
Posted 11 January 2010 - 06:00 AM
I agree with Jack, but would add: Structure your code. If you write code that takes 100 lines to do what could be done in less than 50, your code will take roughly twice as long to run. Code with little or no structure tends to grow in size and complexity, making it harder to debug/change as well as slow when running.
#4
Re: Making PHP Scripts Faster and Less Demanding
Posted 11 January 2010 - 02:39 PM
Sounds like some basic, solid tips.
Thanks a lot.
Thanks a lot.
Page 1 of 1