deepfrydaniel:
I currently have the store set to display the page parse time. The index page generally parses in a second or less, category pages in about a second, EZ pages about the same, etc.
However, the individual product pages are REALLY slow... generally 5-8 seconds.I've just clicked through about 100 products, and I'm getting the following:
Parse Time: 2.284 - Number of Queries: 88 - Query Time: 0.0509565103149
Parse Time: 2.944 - Number of Queries: 94 - Query Time: 0.0576473399963
Parse Time: 2.480 - Number of Queries: 98 - Query Time: 0.0749622143707
Parse Time: 2.408 - Number of Queries: 98 - Query Time: 0.0780691217804
Parse Time: 6.615 - Number of Queries: 98 - Query Time: 0.0890926534882
Parse Time: 3.240 - Number of Queries: 98 - Query Time: 0.0886883344269
Parse Time: 2.949 - Number of Queries: 98 - Query Time: 0.0633110088043
Parse Time: 3.155 - Number of Queries: 100 - Query Time: 0.147603789429
Parse Time: 2.457 - Number of Queries: 98 - Query Time: 0.0772628553009
Parse Time: 3.676 - Number of Queries: 98 - Query Time: 0.0669450330048
Parse Time: 2.373 - Number of Queries: 86 - Query Time: 0.0365003334656
Parse Time: 2.475 - Number of Queries: 86 - Query Time: 0.0511396939545
Parse Time: 3.576 - Number of Queries: 98 - Query Time: 0.0528762222595
Parse Time: 2.322 - Number of Queries: 86 - Query Time: 0.045493946106
From that it appears you've pared down unnecessary steps which has minimized queries, which is good. Also, your database is running very fast. But the bottleneck is the server's CPU for processing the logic to build the pages based on the data pulled from the database.
Even 2+ seconds is very long for processing such a simple bit of data for your pages.
deepfrydaniel:
Query time is generally well under a second, so why is the page taking so long to render?I can't find one that's performing poorly, so very hard to help specifically.
Maybe your specific product has an odd image filename specified for it? Maybe it's got some other bad data in the product's record?
deepfrydaniel:
The only thing I've found that might make a difference is that there are about 2,000 images in my product images folder (mostly images from old, deleted products). Could this slow down the product page that much?Well, it can cause a slowdown, for sure, since it will parse every filename found there. Always best to delete obsolete files such as images and backup .php files.
deepfrydaniel:
I see a SQL error at the bottom of some of the category listings pages That appears to be coming from a poorly-written addon which hasn't figured out how to properly prepare a list of product ids to pass into the query as search criteria ... at the very least it's got apostrophe and parenthesis backwards, and needs its nesting rearranged much smarter.
deepfrydaniel:
Just had a product page take 62.969 seconds to parse! Argh! This is unreasonable!Yes, that's unreasonable, but unless you post the parse time information including the query time, it's very difficult to help you.
And, since I've not been able to stumble upon that one by clicking around your store, perhaps you could point out which specific product you're referring to?
deepfrydaniel:
Update on this... my host sent me these logs that show the queries on product pages taking 4-10 seconds... something is obviously wrong with these, as the index page and category pages make similar queries (or even more / larger queries) and generally execute in a fraction of a second.The first and third of those queries is triggered by your admin when looking for customers who have not placed orders. That's a very specific lookup, which only occurs on pages where you're attempting to send certain emails from the admin side.
The second query you mentioned is a product-listing page query, not a product-info page query, so is not related to the problem at hand.
deepfrydaniel:
Judging by the number of forum posts about slow product pages this is clearly a bug with zencart, and one I haven't seen solved adequately.Most of the time those problems are caused by the hosting server and/or addons, or extraneous files left around on the server. Not sure how that's a ZC "bug" per se.
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.