Posts: 3,110
Location: Toronto, Ontario
|
To give you an idea: This webmaster-talk forum (stats about posts/threads/users at the bottom of the home page) takes about 0.2 seconds to process (on a good day, we're actually looking to optimize right now) the script. This includes querying the database, rendering templates etc. A thread page such as this one runs about 20 queries.
Obviously this site and yours are totally different applications, but the numbers should give you a rough idea of what is acceptable. If your script takes 10 seconds to parse, and you run 200 queries per pageload, then you probably need a new programmer
If I had to guess, I'd say that either your new script is some how reading too much data into memory. For example, if you have 1000 categories, perhaps the script is fetching all 1000 categories into memory regardless of weather the current page actually needs data from all of them. Or perhaps there is a query being run in a loop (usually rule #1 programmers learn when working with databases is never run queries in a loop!  ). I realize you're not a programmer, so I'll give you an example of what I mean. Imagine that on your homepage you show 15 random categories and 3 random listings from those categories. A query in a loop means that for each of those categories, a query is run to fetch the 3 listings. That means 15x3 or 45 queries are run just to fetch that data. The more queries or the more complex the queries are, the longer it will take.
So hopefully you can get a query count and a query timer to see where the problems are. But from what you describe, I really don't think the site should take 60 seconds per page load. Even a badly programmed site doesn't take that long 
|