View Single Post
Old 09-19-2010   #7
xcoder
Ma ghayro
 
xcoder's Avatar
 
Last Online: 04-19-2018
Join Date: Dec 2005
Posts: 5,592
Thanks: 1,765
Thanked 4,201 Times in 2,361 Posts
Groans: 12
Groaned at 18 Times in 11 Posts
Default

Quote:
Originally Posted by Google View Post
Cool script.
Other than that, use something lighter and faster than MD5.
MD5 will obviously slow down your script.

---

How about a PHP optimization competition?
I can prepare one if there will be enough participants.
The competition will involve a PHP script written in a bad way that must be optimized in order for it to run faster. So basically, we measure the time taken by each script to run and the person with the fastest script will be the winner.
Just saw your post, i am in as long it doesn't require much time from my side.
However, optimizing an application doesn't stop on the development level.
Apache could be tweaked to easily double and triple performance.

- Enable "Worker" mode instead of "Prefork" on apache.

- Enable Gzip or mod_deflate to compress output content even though this will increase CPU load but will reduce your page size dramatically and eventually make the page load way faster since it's compressed on the server side > sent to client > uncompressed by the client browser and displayed.

- Add PHP accelerator like APC along side with the PHP based caching system.

- Disable many options from PHP like "magic_quotes" for example.

- Use a PHP caching system and make sure it's the very first thing to load on the page, this will reduce PHP rendering to very low levels and totally stop any SQL connections. Refer to the first post in this thread.

Or simply go with advanced caching systems such as Memcached (More complicated than regular classes but does wonders, many popular websites such as twitter use it).

Tweaking your server and optimizing your application could make your machine handle times more traffic and serve your client at higher speed.
__________________
http://twitter.com/danymoussa
xcoder is offline   Reply With Quote