Site Very Sluggish After Installing Vivashop Theme

My home page and, to some extent, product pages have become very slow since installing the VIVAshop theme. Is this caused by the animations, the graphic intensity, scripts, or what?



http://www.kingsleypress.com



I'd appreciate any input anyone has. I tried disabling some blocks on the home page but it didn't seem to change anything much.



GTMetrix score went from an AA to a BA. The home page gets an F for “defer javascript.”



Thanks in advance for your help.

I contacted the developer of the theme and they sent me an “optimized” background image to try. This makes no difference.



I also removed the background image and used a color instead. This also seems to make no difference.



The developers also suggested turning on gzip compression for css and js in the config file:



'gzip_css_js' => true,



This also doesn't seem to do anything.



Anyone have any other ideas? Is anyone else using this theme and getting good speeds?

I would advise you to install firebug.



Here are the errors from the console:






Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://fonts.gstatic.com/s/lato/v11/9k-RPmcnxYEPm8CNFsH2gg.woff. This can be fixed by moving the resource to the same domain or enabling CORS.



Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://themes.googleusercontent.com/static/fonts/lato/v7/2HG_tEPiQ4Z6795cGfdivD8E0i7KZn-EPnyo3HZu7kw.woff. This can be fixed by moving the resource to the same domain or enabling CORS.



Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://fonts.gstatic.com/s/raleway/v9/IczWvq5y_Cwwv_rBjOtT0w.woff. This can be fixed by moving the resource to the same domain or enabling CORS.
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://themes.googleusercontent.com/static/fonts/lato/v7/wkfQbvfT_02e2IWO3yYueQ.woff. This can be fixed by moving the resource to the same domain or enabling CORS.




These need to be fixed first.



However, the main issue can be seen in the 'NET' tab as it takes over 7.5 seconds before your server even begins to respond.



I would advise you to inspect your website in debug mode and see what is causing this delay in response.

Are those console errors something to do with Google fonts? I've tried with those turned on and turned off…makes no difference.



Thanks for your help! I have submitted the information you gave above to my web host.



Also note that I am using Amazon Cloudfront for CDN. Should I try turning that off? With my previous theme, having a CDN was a benefit–maybe that's not the case with this one.

I'm attaching here a screenshot of the debug window after loading the home page. Not really sure how this helps me.



[attachment=8518:Screen Shot 2014-10-13 at 5.35.45 PM.png]

Screen Shot 2014-10-13 at 5.35.45 PM.png

the fonts should be hosted on your site or on cloudfront.



the query time is not significant but 1300 queries seems insane to me. that's something to inspect.

turning off cloudfront is definitely something to try in order to find the problem.

another thing to try after that is to disable all addons and see if that changes the loading time.

P-Pharma, the errors you posted above from Firebug–what URL were you on at that time? I can't seem to reproduce that on the home page.

OK I do believe I've found the culprit for the long load times! I disabled the “Lowest Price” add-on from CSCartRocks and load times have decreased significantly.



Page generation for the home page has gone down from 12.4 to 3.4 seconds. SQL queries has gone down from 1300 to 191.



I'll contact Louis at CSCartRocks and let him know, so he can fix it.



Thank you for your help.

I'm glad I could help. But 191 queries and 3.4 seconds is still a lot.

I was visiting the homepage: http://www.kingsleypress.com/

I am still getting the cross-origin errors in the firebug console. The fonts do not load, though the page keeps trying. This may hold up the page load.

The server now responds in 2.5 seconds instead of 7.5 seconds. 2.36 seconds is waiting to connect. The total load time from my location is 4.8 seconds. This is still too much. Most users are gone within that time.

Cloudfront is taking a long time to serve up some files. Up to 400ms per file.

themes.googleusercontent.com is taking up to 355ms to connect for various files.



Try disabling all addons and then turn them on. One by one. And keep a close eye on the loading time.

Also: Can you review the queries to see which queries are slow?

I've done some reading, and the Cross Origin errors happen because Firefox (and perhaps Chrome) do not allow loading of fonts from a secondary domain (such as CloudFront) unless they have Cross Origin Resource Sharing enabled. There's an article here on how to enable CORS on Cloudfront:



Using cross-origin resource sharing (CORS) - Amazon Simple Storage Service



but I'm afraid it might as well be written in Greek.



I'll try your suggest of disabling all add ons tomorrow when I have more time. It does sound a bit radical to me. For tonight I will try turning of CloudFront and see what that does.

As always, Louis from CSCartRocks has come through and fixed the Lowest Price add-on. It's now enabled and not having any impact on page load times.

Site looks nice, but still loading pretty slow for me

[quote name='kingsleypress' timestamp='1413249015' post='194077']

I've done some reading, and the Cross Origin errors happen because Firefox (and perhaps Chrome) do not allow loading of fonts from a secondary domain (such as CloudFront) unless they have Cross Origin Resource Sharing enabled. There's an article here on how to enable CORS on Cloudfront:



http://docs.aws.amaz…t/dev/cors.html



but I'm afraid it might as well be written in Greek.



[/quote]

Move the font files to your own server and it will be fixed. The issue is likely that you are using 3 or more domains to serve one file. (your site domain, cloudfront, the off site location of the file)

There might also be an issue in CS-Cart's multisite function (if there are multiple domains active)

[quote name='P-Pharma' timestamp='1413279597' post='194122']

Move the font files to your own server and it will be fixed.

[/quote]



How do I do that?



Is it anything to do with the switch in the Visual Editor “Use Google Fonts”? That's currently set to ON. In the instructions that came with VIVAshop it said that turning that off would increase page load times.

[quote name='P-Pharma' timestamp='1413247808' post='194076']

The server now responds in 2.5 seconds instead of 7.5 seconds. 2.36 seconds is waiting to connect.

[/quote]



What tool are you using to measure server response time?

Your bg image is huge, 333kb fullHD size :)

[quote name=‘Darius’ timestamp=‘1413284856’ post=‘194134’]

Your bg image is huge, 333kb fullHD size :)

[/quote]



Yeah I know. I tried taking that away and just using a color, but it didn’t seem to make much difference.

It doesn't make much difference because you have many issues to resolve. Optimizing your images will increase your site speed a bit.


[quote name='kingsleypress' timestamp='1413280841' post='194126']

What tool are you using to measure server response time?

[/quote]

Firebug (NET tab)

You can also watch it here: WebPageTest - Running web page performance and optimization tests...

There seems to be a problem with the DNS lookup as it takes 288ms for initial DNS lookup of your page.

It also takes 249ms for Google Analytics DNS lookup. Google Analytics should be loaded Asynchronous so that the page load is not hindered by it.


[quote name='kingsleypress' timestamp='1413279967' post='194124']

How do I do that?



Is it anything to do with the switch in the Visual Editor “Use Google Fonts”? That's currently set to ON. In the instructions that came with VIVAshop it said that turning that off would increase page load times.

[/quote]

The general idea is that if you load your fonts from other servers then this will offload the strain on your server and will allow your site to be as fast as the server where the fonts are hosted. However, if your own server is faster than the other servers then it means a decrease in page load. Currently your webfonts do not load at all.



I think you would do well to contact your host and the style provider for help. They should be able to identify some of the problems and help you there. It would not hurt to hire one of the CS-Cart experts here to optimize your store & server.

OK thanks. I don't know how to load GA asynchronously because I'm just using CS-Cart's GA add-on. Nor do I know how to get the web fonts to load. So yeah, I'll contact one of the developers here and have them help me. Thanks.

[quote name='P-Pharma' timestamp='1413289934' post='194147']Currently your webfonts do not load at all.[/quote]



I have approached the theme developer about this and they say the fonts are loading just fine for them. What browser and operating system are you using?