Some tips to improve the performance of a web app


Before writing anything about this, I would like to apologize Odin Chen because I did not fulfill my exaggeration that I will make my web app run 500 times faster than before. After the most recent benchmark, it probably runs only 10 times faster 😛

Here is the list I have applied to my app, hope it helps someone

  • Compress web files such as javascript and css files, that saves both web traffic and loading time.
  • Add an expires header to web files and images, it is only necessary when those files are not changed before they expire (I am still finding the best way to do it)
  • Choose a small footprint server, I know Ubuntu 7.10 is great but you do not need the latest PHP 5.2.5, why dont you consider Debian?
  • Compile your own package with your own configuration, or at least install only the essential packages from the repos, not all of them 😛
  • Use a caching engine such as APC, eAccelerator, Zend Optimizer, or memcached …
  • Use your skill in programming, yes by that I mean code efficiency : do not forget to join foreign table, that saves many time in database querying, and unset the variables or objects that used in actions file that are no longer needed in template file

In the future, if I read or think of some other tips I will blog about it, if you have any advice, do not hesitate do leave a comment here. 😀

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s