Site fast, but Product Pages are Slugs!
Permalink
Two Questions Regarding Page Load Speed and any Suggestions to Fix.
Site fast, but Product Pages are Slugs!
Possible Issues?
1) Do Spacers <div class="ccm-spacer"> </div> Slow Loading?
2) Do blank content blocks on a page slow loading?
Here is why I ask:
In an attempt to speed things up, I have made more than a half dozen optimizing enhancements, wrestled for weeks with caching / no caching and have toyed with Miser (site is in development). The results have moved load times (other than product pages) from 10+ seconds down to .5 seconds. Unfortunately, as too many other members have found, after spending endless hours wrestling with this and that, jubilant success is not always long lived.
Using the Cache in my case has worked well to a point. The problem is if I want every user to have a prompt gratifying experience on all pages (not just the second and beyond to select) I need to go through and load every page. If not impossible, certainly not practical to go through hundreds of product pages to load them into the cache, not to mention the mountain of cache files it will generate.
There are a couple of things that are unique to the product pages and have 2 product blocks per page.
1) Have eliminated attribute labels from appearing if an attribute is blank even though selected in the product block. All products are unique one of a kind, and often require different attributes such as for Jewelry versus Art or Furniture. This enhancement really works nicely. However, it appears spacers are being added in place of non-used attributes in the coding, but not on the page.
QUESTION: Will Numerous <div class="ccm-spacer"> </div> Slow Loading?
2) In order to have flexibility to add Global text and or images (such as sales & specials and possible disclaimers) in key places on the product page I have empty content blocks on the page.
QUESTION: Do blank content blocks on a page slow loading?
Appreciate anyone wanting to take a stab at the questions as well as offer any suggestions.
Appreciate anyone wanting to take a stab at the questions as well as offer any suggestions to fix. I have got to speed up the product page load time before going live, if I am not dead before then!
Site fast, but Product Pages are Slugs!
Possible Issues?
1) Do Spacers <div class="ccm-spacer"> </div> Slow Loading?
2) Do blank content blocks on a page slow loading?
Here is why I ask:
In an attempt to speed things up, I have made more than a half dozen optimizing enhancements, wrestled for weeks with caching / no caching and have toyed with Miser (site is in development). The results have moved load times (other than product pages) from 10+ seconds down to .5 seconds. Unfortunately, as too many other members have found, after spending endless hours wrestling with this and that, jubilant success is not always long lived.
Using the Cache in my case has worked well to a point. The problem is if I want every user to have a prompt gratifying experience on all pages (not just the second and beyond to select) I need to go through and load every page. If not impossible, certainly not practical to go through hundreds of product pages to load them into the cache, not to mention the mountain of cache files it will generate.
There are a couple of things that are unique to the product pages and have 2 product blocks per page.
1) Have eliminated attribute labels from appearing if an attribute is blank even though selected in the product block. All products are unique one of a kind, and often require different attributes such as for Jewelry versus Art or Furniture. This enhancement really works nicely. However, it appears spacers are being added in place of non-used attributes in the coding, but not on the page.
QUESTION: Will Numerous <div class="ccm-spacer"> </div> Slow Loading?
2) In order to have flexibility to add Global text and or images (such as sales & specials and possible disclaimers) in key places on the product page I have empty content blocks on the page.
QUESTION: Do blank content blocks on a page slow loading?
Appreciate anyone wanting to take a stab at the questions as well as offer any suggestions.
Appreciate anyone wanting to take a stab at the questions as well as offer any suggestions to fix. I have got to speed up the product page load time before going live, if I am not dead before then!
spacer's you won't see any difference, but having empty blocks (or full blocks) still take up resources (fetching from the db and rendering)
Mnkras, Thanks for your input, I got to figure a way to speed things up. Have reduced blocks, removed the slider, and reduced product images to 60k or less. If anything, speed has gotten worse. Will keep plugging.
Maybe spit each page into 2 pages, a first part that needs to show as quickly as possible, then a second part that can be loaded by ajax in the background while the viewer is looking at the first part.
John, Thanks for your thoughts, not sure I can easily ajax the second product block. I see that Tony has a couple ajax addons, but may require rebuilding the pages completely, which am hoping I don't have to do. No problem adding the products, but deleting them in bulk appears to be a problem unless I can attack a file to do it in bulk.
Do not have a lot on the pages. Have tested with a blank default detail page with only the 2 product blocks and things were good. So I figure something else is going on.
If you have any spontaneous spare time (: and would be willing to take a gander I can PM you an ID. Have viewed your eCommerce flower site.. great work! Thanks, Tim
Do not have a lot on the pages. Have tested with a blank default detail page with only the 2 product blocks and things were good. So I figure something else is going on.
If you have any spontaneous spare time (: and would be willing to take a gander I can PM you an ID. Have viewed your eCommerce flower site.. great work! Thanks, Tim
I checked a couple of listings and a couple of products from each. There is nothing obviously out of place with the network traffic.
The document starts loading within a 1.5 to 3 second delay, so I would put that down to general internet variation and maybe variable loading of your server.
I made one page click that went off and never loaded, but worked quickly when I stopped it and clicked again. This may be a sign of a busy server.
Overall, I don't feel the timing would put me off using the site.
The document starts loading within a 1.5 to 3 second delay, so I would put that down to general internet variation and maybe variable loading of your server.
I made one page click that went off and never loaded, but worked quickly when I stopped it and clicked again. This may be a sign of a busy server.
Overall, I don't feel the timing would put me off using the site.
Thanks John, Appreciate you taking a look. This is one of my personal business sites using BlueHost. Tim
John, Once again thanks for your help. My guess is that you were pulling up product pages that were already in the cache to get the reasonable times you were showing and the one that failed to load was one that had not. This is the root of my problem, can not get product pages that have not been initially slow loaded to load under 15 seconds and sometimes more.
Had another look. Had several products time out. So now I can see the problem.
Looking at the product code, some ideas that come to mind:
- You have 2 product blocks on the same page. Maybe rendering them is causing database locking arguments.
- You have lots of spacers on the page to do the layout. Each of these is potentially a database query. Maybe there are so many that the database caching is overloaded, so the whole database is now doing lots of disc file access, indexing and searching, rather than pulling some data from a memory cache.
FIRST: Make a database backup.
Things to try (one at a time). Pick just one page to experiment with:
1. Remove all the spacers, blocks with just lines in them and such. Don't worry about the formatting. If this improves performance, you can sort out the formatting with css or tables (I know tables are frowned on by purists, but they may be easier for you to use).
If this makes no change to performance, revert to the previous version of the page.
MAKE ANOTHER DATABASE BACKUP
2. Remove the second product block. If this improves performance, you can add the extra product pics back in with a gallery or slider block - ideally an ajax version because that will load the extra pics in the background rather than during page load (personally I reckon a galley or slider block would also look better than the second product block, but that's a matter of personal preference)
If neither work, you can go back to a previous version of the page, or (if the change becomes too catastrophic), revert to one of the database backups.
If either of these do the trick, then you will probably want to get the layout sorted out. Do it with css by adjusting padding and margins of the blocks you have. For one block you could do it with the spacing tab of block design,. But that's clumsy for your whole catalogue, so probably best to play with rules in your theme css or add your own css, or get one of the C5 theme experts to make the changes form you.
Looking at the product code, some ideas that come to mind:
- You have 2 product blocks on the same page. Maybe rendering them is causing database locking arguments.
- You have lots of spacers on the page to do the layout. Each of these is potentially a database query. Maybe there are so many that the database caching is overloaded, so the whole database is now doing lots of disc file access, indexing and searching, rather than pulling some data from a memory cache.
FIRST: Make a database backup.
Things to try (one at a time). Pick just one page to experiment with:
1. Remove all the spacers, blocks with just lines in them and such. Don't worry about the formatting. If this improves performance, you can sort out the formatting with css or tables (I know tables are frowned on by purists, but they may be easier for you to use).
If this makes no change to performance, revert to the previous version of the page.
MAKE ANOTHER DATABASE BACKUP
2. Remove the second product block. If this improves performance, you can add the extra product pics back in with a gallery or slider block - ideally an ajax version because that will load the extra pics in the background rather than during page load (personally I reckon a galley or slider block would also look better than the second product block, but that's a matter of personal preference)
If neither work, you can go back to a previous version of the page, or (if the change becomes too catastrophic), revert to one of the database backups.
If either of these do the trick, then you will probably want to get the layout sorted out. Do it with css by adjusting padding and margins of the blocks you have. For one block you could do it with the spacing tab of block design,. But that's clumsy for your whole catalogue, so probably best to play with rules in your theme css or add your own css, or get one of the C5 theme experts to make the changes form you.
John, Thanks for your time on this, very good steps. I took all but one "tnspacer" out of the Jewelry pages, but makes no difference. I was able to this as I use several different product page defaults.
Unfortunately makes no difference that I could tell in the loading speed. In fact it appears that caching is actually the culprit. I thought this may be an issue prior, and had not allowed page defaults on a test page. However, having cache enabled it did not have a positive effect even though the page was disabled.
Per my initially post, I created a blank test page with just the product blocks, and things were improved, but once Superfish is added and only a few other blocks things speed-wise are pretty much the way the are for any other page.
It appears I can not use caching with this site as it slows things down all initial page loads to 20+ seconds. This is the case with all pages, but thought I would initially load all other pages even though it was timely.
With cache cleared and disabled and the script optimizer enabled, product pages and most other pages appear now load in 5 seconds or under. Not where I want it, but just may need to live with it as I have now spent weeks on trying to speed things up.
Oh well...Thanks Again, Tim
Unfortunately makes no difference that I could tell in the loading speed. In fact it appears that caching is actually the culprit. I thought this may be an issue prior, and had not allowed page defaults on a test page. However, having cache enabled it did not have a positive effect even though the page was disabled.
Per my initially post, I created a blank test page with just the product blocks, and things were improved, but once Superfish is added and only a few other blocks things speed-wise are pretty much the way the are for any other page.
It appears I can not use caching with this site as it slows things down all initial page loads to 20+ seconds. This is the case with all pages, but thought I would initially load all other pages even though it was timely.
With cache cleared and disabled and the script optimizer enabled, product pages and most other pages appear now load in 5 seconds or under. Not where I want it, but just may need to live with it as I have now spent weeks on trying to speed things up.
Oh well...Thanks Again, Tim
To summarise what you have said, the time taken to optimise and cache a page the first time it is shown is prohibitively hight, even if it is subsequently a couple of seconds faster than the raw page render.
Maybe you should ask on the mizer thread? (it is mizer you are using?)
There are optimiser/cache strategies and design models that could get round this, but they are not simple code.
For example, an optimiser could build the optimisation through a series of steps, completing just one step at each page view until all are ready and can be used for an optimised page thereafter. Some of these steps may be usable by themselves, so as to get some benefit before the overall process was complete.
Maybe you should ask on the mizer thread? (it is mizer you are using?)
There are optimiser/cache strategies and design models that could get round this, but they are not simple code.
For example, an optimiser could build the optimisation through a series of steps, completing just one step at each page view until all are ready and can be used for an optimised page thereafter. Some of these steps may be usable by themselves, so as to get some benefit before the overall process was complete.
John, Yes using miser but need to discontinue when the site goes live due to its unavailability regarding commercial applications. Waiting for 5.5 that supposedly has the ability to add in optimizing elements.
Using cache without miser produces worse results.
Initial loads can run 20+ seconds with cache and miser but less than 2 seconds thereafter. With just miser each page loads in about 5 seconds give or take a second.
I have made quite a few edits based on suggestions within the forum including those included in the miser threads and Andrews top 5 speed boosters. Have Gzip enabled, fast php, Zend Optimizer, & zlib.
I will keep researching for a solution, but beginning to think it is what it is. Thanks again, Tim
Using cache without miser produces worse results.
Initial loads can run 20+ seconds with cache and miser but less than 2 seconds thereafter. With just miser each page loads in about 5 seconds give or take a second.
I have made quite a few edits based on suggestions within the forum including those included in the miser threads and Andrews top 5 speed boosters. Have Gzip enabled, fast php, Zend Optimizer, & zlib.
I will keep researching for a solution, but beginning to think it is what it is. Thanks again, Tim
AFAIK caching should cache most of the page on the product page as long as anyone has ever visted a product page during that caching cycle. I've seen this work very well on a site with over 18,000+ products.
I am of the group of people that think running a modern database driven site without caching is absurd. Opinions vary but that's mine.
You can write a script or have a script written that "Primes" the cache if you are worried about the one slow load for one user.
I am of the group of people that think running a modern database driven site without caching is absurd. Opinions vary but that's mine.
You can write a script or have a script written that "Primes" the cache if you are worried about the one slow load for one user.
Hi Mike, I had a couple of looks at the site and am inclined to agree with MrGrowBizz's interpretation that priming the cache for just one product page is taking longer than a browser timeout. What I cant solve is why it should be taking so long? There are some issues with page structure, but they don't seem to be the cause.
Guys really appreciate your involvement. Mom had a massive stroke so difficult to communicate on the iPhone today.
Mkly, I think "You can write a script or have a script written that "Primes" the cache if you are worried about the one slow load for one user." is exactly the solution I am looking for if I can fix the site.
Phallanx has identified that when Miser is enabled js is trying to include images versus the normal path indicating there may be a C5 issue regarding image path.
I have spent time on fixing this but have yet to achieve any success. Thanks much guys.
Mkly, I think "You can write a script or have a script written that "Primes" the cache if you are worried about the one slow load for one user." is exactly the solution I am looking for if I can fix the site.
Phallanx has identified that when Miser is enabled js is trying to include images versus the normal path indicating there may be a C5 issue regarding image path.
I have spent time on fixing this but have yet to achieve any success. Thanks much guys.
A new thread may have the explanation
http://www.concrete5.org/community/forums/customizing_c5/a-word-of-...
(Either for new block templates, or for the slowness of missing files.)
http://www.concrete5.org/community/forums/customizing_c5/a-word-of-...
(Either for new block templates, or for the slowness of missing files.)
mkly,
Have you written such a script before? Thanks
Have you written such a script before? Thanks