View Single Post
  #1  
Old Sep 23, 2009, 10:17 AM
quintin3265's Avatar
quintin3265 quintin3265 is offline
Senior Member
 
Join Date: Mar 2009
Location: State College, PA
Posts: 193
Default Performance improvements

I just spent 20 hours working on performance improvements, concentrating on the song listing grids that demand a lot of attention by visitors.

It seems like the page loads about ten times more quickly now. In initial tests, I was able to reduce the number of queries on these pages from 160 to 60, and reduced the loading time from 15s every time to a variable time between .5s and 2.5s, depending upon which column is being sorted or searched. Sorts on the "reviews" column will take the longest, for example.

The time savings resulted from eliminating unnecessary tables from the queries depending on which fields are displayed, making use of the query cache in MySQL, and creating FULLTEXT indices. Interestingly, the performance improved significantly when I simply went back to using Propel as often as possible. I had thought that running one large query with calculated columns at once was faster than running 60 small queries as needed, but that is apparently not the case. The developers at Propel must have spent a lot of time on optimization, and I'm surprised that it would work better than writing raw queries.

Comments?
__________________
Now you can embed your songs in forum posts and webpages just like this image! Click the image to find out how!