Comments and Vote unusable due to speed (resolved)
As it stands, I can not sell a site to anyone where a product takes that long to load.
Please Log in or Create an account to join the conversation.
I'll post my fudge when I get it working
Please Log in or Create an account to join the conversation.
As far as I know that's already the case.
You can look at the view files of the view "vote" where you will see that the JS doing that is done after the product page loads:
Please Log in or Create an account to join the conversation.
Thanks for the reply.
I thing you may have misunderstood my posts. I know the JS is converting the hikashop_product_vote_mini to show stars after the page loads.
I am rewriting the vote and comments areas, hikashop_product_vote_mini, hikashop_product_vote_listing and hikashop_product_vote_form to load AFTER the page has been loaded. The code which populates them in the product class, adds just over three seconds to a product page load. This time for me is not acceptable and believe will not be accepted by most clients.
I really want to use the feature which I think is a great addition to the component, so I am changing the code to load these divs after the page has displayed the product. Doing this it meant that the JS code for converting the input to stars had already run, so I need to run it again.
I am doing this without hacking the original code for the class and using the product/show_default, and some jQuery, which is why I called a fudge. I will have a go today and if it works, do a new three in the "how to" forum so other may use it.
Thanks again for pointing me in the right direction.
Please Log in or Create an account to join the conversation.
Any ideas that would not involve rewriting your JS?
Please Log in or Create an account to join the conversation.
Instead I suggest to locate why it's slow for you and then we can think of a way to avoid the problem.
It's not normal that the votes interface takes more time to load that the whole rest of the page.
So let's try to understand the problem.
If you activate the debug mode of the joomla configuration, do you have a lot of queries related to votes ? How many ? What are they ?
Do you have speed issues when there is no votes/comments listed ? Or only when there are ?
If you disable the comments and only have the votes, does it changes anything ?
What if you disable the javascript of the page ? Does it displays faster (even if it doesn't display properly). That would indicate that the problem is not the process on the server's end but in the javascript handling the votes system.
Understanding all that will already help understand where is the problem.
Please Log in or Create an account to join the conversation.
The interface does not take longer to load, the whole page takes longer. I am putting together several sites in the clothing and fashion industries, and the page loads on such sites are very very quick and it is what is expected. I personally think a delayed Ajax load is the best way to do this as the user sees the product straight away and the comments which are non-essential and usually at the bottom (often off-screen) can be lazyloaded.
Answer to your questions:
Q- do you have a lot of queries related to votes ? How many ? What are they ?
51 with 'Display vote in products page' = Yes
37 with 'Display vote in products page' = No
Q - Do you have speed issues when there is no votes/comments listed ? Or only when there are ?
This is irrespective of wether or not a product has any comments or votes. There is 1.5 second added on my local server running in MAMP which is like rocket for other pages such as category and product listings. Usually under 0.5 second for a page.
Q - If you disable the comments and only have the votes, does it changes anything ?
It speeds up by 1.5 seconds (product with no variations is 0.5 seconds and with variations 1.5 seconds - this issue is on another thread which you are also helping me with)
Q - What if you disable the javascript of the page ? Does it displays faster (even if it doesn't display properly).
It speeds up by less than 0.5 of a second. So the gathering of data is the slowest.
I have also tried using one of the base templates in case it was the template, but no change.
Please Log in or Create an account to join the conversation.
The HikaShop part of the page takes less that 0.4 sec even though the product has a characteristic and votes.
Products listings takes approximately the same time on my computer.
I don't see how you can have such difference.
Could you do a screenshot of the "vote" tab of the configuration ? Maybe there is something else...
Just to be sure, if you remove the view customizations you did on the product page, do you still have the problem ?
Please Log in or Create an account to join the conversation.
One of the first things I tried was removing the customisation of the Hikashop files. So yes I still have the problem.
I have even set the page to render with the Atmic template so none of the modules render with it, nor are there any menus etc.
With votes off:
With votes on:Application 0.000 seconds (+0.000); 0.76 MB (+0.758) - afterLoad
Application 0.017 seconds (+0.017); 2.44 MB (+1.678) - afterInitialise
Application 0.031 seconds (+0.014); 3.52 MB (+1.087) - afterRoute
Application 0.102 seconds (+0.071); 5.40 MB (+1.881) - afterDispatch
Application 1.552 seconds (+1.450); 5.64 MB (+0.238) - afterRender
As you can see it is quite a large jump.Application 0.000 seconds (+0.000); 0.76 MB (+0.759) - afterLoad
Application 0.016 seconds (+0.016); 2.44 MB (+1.678) - afterInitialise
Application 0.027 seconds (+0.012); 3.52 MB (+1.087) - afterRoute
Application 0.103 seconds (+0.075); 5.57 MB (+2.042) - afterDispatch
Application 3.108 seconds (+3.005); 5.83 MB (+0.265) - afterRender
Please Log in or Create an account to join the conversation.
It could come maybe from a system plugin which would have a hard time processing the HTML of the comments area for some reason ? You should check your plugins and try to disable them one by one to see if one helps.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Time to go and find out why the problem exists with the plugin.
Again many thanks for taking the time to help.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.