VirtueMart Forum

VirtueMart 2 + 3 + 4 => Security (https) / Performance / SEO, SEF, URLs => Topic started by: Ihateit on December 17, 2012, 11:14:53 AM

Title: Slow Virtuemart 2 site. How to optimize
Post by: Ihateit on December 17, 2012, 11:14:53 AM
Hey Forum,

i am running a slow Virtuemart 2.0.14 on joomla 2.5.6.
On the site i am running:
Zopim, live chat plugin
Piwik, live tracking of user behaviour (from piwik.org)
FB Like button
SJ Minicart Pro (cart)
Smart slider (product viewer)
MoWebSo (Popular products, related and so forth)
Product filter (specify product type and price, and receive suggestions for purchases)
Smart search (made by offlajn)

We are running all these extensions/plugins, but would like to cut down on the loading time of the site.
Are there some general rules to clean up the site? Like CSS or queries.

I have seen these plugins that might help. Whats your thoughts about them?
For the CSS part: http://extensions.joomla.org/extensions/core-enhancements/performance/site-performance/12088?qh=YToxMTp7aTowO3M6MzoiamNoIjtpOjE7czo5OiJvcHRpbWl6ZXIiO2k6MjtzOjk6Im9wdGltaXplZCI7aTozO3M6MTI6Im9wdGltaXphdGlvbiI7aTo0O3M6Nzoib3B0aW1hbCI7aTo1O3M6MTA6Im9wdGltaXppbmciO2k6NjtzOjg6Im9wdGltaXplIjtpOjc7czo5OiJvcHRpbWFsbHkiO2k6ODtzOjk6Im9wdGltaXplcyI7aTo5O3M6MTM6Im9wdGltaXphdGlvbnMiO2k6MTA7czoxMDoib3B0aW1pemVseSI7fQ%3D%3D (http://extensions.joomla.org/extensions/core-enhancements/performance/site-performance/12088?qh=YToxMTp7aTowO3M6MzoiamNoIjtpOjE7czo5OiJvcHRpbWl6ZXIiO2k6MjtzOjk6Im9wdGltaXplZCI7aTozO3M6MTI6Im9wdGltaXphdGlvbiI7aTo0O3M6Nzoib3B0aW1hbCI7aTo1O3M6MTA6Im9wdGltaXppbmciO2k6NjtzOjg6Im9wdGltaXplIjtpOjc7czo5OiJvcHRpbWFsbHkiO2k6ODtzOjk6Im9wdGltaXplcyI7aTo5O3M6MTM6Im9wdGltaXphdGlvbnMiO2k6MTA7czoxMDoib3B0aW1pemVseSI7fQ%3D%3D)

For the query part: http://codingmall.com/products-mainmenu-8/87-faster-joomla-a-virtuemart (http://codingmall.com/products-mainmenu-8/87-faster-joomla-a-virtuemart)

I will be able to give a test login, so you can see the site if you want, because its "offline" right now.

Thanks in advance :-)
Title: Re: Slow Virtuemart 2 site. How to optimize
Post by: jjk on December 17, 2012, 12:20:16 PM
At first I would try find out which of your additional extensions are slowing down your shop (I guess the slide show and the chat), i.e. with the help of the Firefox "Firebug" plugin ('Net' tab). Another major speed factor often is the number of websites hosted on your server.
Title: Re: Slow Virtuemart 2 site. How to optimize
Post by: Milbo on December 17, 2012, 14:35:28 PM
Vm2 is quite fast, only if you use a lot of customfields it is going to slow down. But this is already enhanced in the svn. If you have products with an average of 2 customfields the new version 2.1 is 40% faster. I also checked yesterday a shop with 75k products in one category and the speed is like amazon or google. But for this result I also did some tuning. Of course no changes of the code, just server settings.

Lets take a closer look:
"Zopim, live chat plugin": do you know how this works? usually a chat with html works with constantly reloading part of the page via ajax. Show the chat only in special areas. There is also a lot todo with the template and so on. You may write me a pn.
Title: Re: Slow Virtuemart 2 site. How to optimize
Post by: randomdev on December 18, 2012, 04:36:55 AM
If you are using firebug you can click on the 'Net' tab and get a rundown on the page loading times.

There are also some online tools that will give you suggestions:
https://developers.google.com/speed/pagespeed/insights
http://tools.pingdom.com/fpt/

But it can be hard to diagnose what is slowing down the site without doing a test before then after disabling each component.
Adding the following cache rules in the .htaccess sped up my site a bit (possibly best to add these once you are done developing)
########## Begin Enable Caching ##########
#
# enable expirations
ExpiresActive On
# expire images after a month in the website visitor cache
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/x-icon "access plus 1 month"
# expire stylesheets and javascript after 1 week in the website visitor cache
ExpiresByType text/css "access plus 1 week"
ExpiresByType application/javascript "access plus 1 week"
# expire flash and XML 1 month and 1 week respectively in the website visitor cache
ExpiresByType application/x-shockwave-flash "access plus 1 month"
ExpiresByType text/xml "access plus 1 week"
#
########## End Enable Caching ##########
Title: Re: Slow Virtuemart 2 site. How to optimize
Post by: Ihateit on December 18, 2012, 11:10:33 AM
Hey guys, thanks for the answers :-)

I've installed the component to see loading times of my modules and components, and located the problems.
There were quite some loading time on MoWebSo product view (popular/cheapest products), but i've cached that, so that loading time is decreased by a whole lot.
Another problem is the cart. It is taking up to 1 second to load just that. And when adding something to the cart, the site is taking up to 6 seconds to go to the checkout/cart page. I've installed Ajax Minicart Pro from SmartAddons. Do you think i can do anything to decrease the loading time of the cart in any way at all?

The last problem, i have located but not quite found out the solution or what is actually going wrong. I suspect it is either the server (unoeuro.com) or a DNS/IP country/language checker. Or is it just the template and all CSS loading?? The loading times of the last problem is listed here:
Application 0.001 seconds (+0.001); 1.20 MB (+1.201) - afterLoad
Application 0.352 seconds (+0.350); 10.46 MB (+9.263) - afterInitialise
Application 0.392 seconds (+0.040); 11.43 MB (+0.967) - afterRoute
Application 0.862 seconds (+0.470); 17.49 MB (+6.062) - afterDispatch

@jjk & @randomdev - I used the Net from Firebug, and found out that its looking for an Arimo font from googles server. I dont know if that could be causing any problems, because it cant find the font .woff file.

@randomdev - I will be adding that when i've finished developing the site.

//AndersJ
Title: Re: Slow Virtuemart 2 site. How to optimize
Post by: Ihateit on December 18, 2012, 11:29:04 AM
I also found this, using the Firebug Net:

URL: GET www.ssdbutikken.dk. Status: 200 OK. Domain: ssdbutikken.dk. Size: 65,9 KB. Timeline: 2.03s.

I believe thats a little too long to "GET" but what does this mean exactly?
Title: Re: Slow Virtuemart 2 site. How to optimize
Post by: Ihateit on December 18, 2012, 11:37:22 AM
I printscreened this for you. Is it all of my .js and .css taking up the loadtime??

http://www.ajytzler.dk/pics/loadtimeNET.jpg (http://www.ajytzler.dk/pics/loadtimeNET.jpg)
Title: Re: Slow Virtuemart 2 site. How to optimize
Post by: jjk on December 18, 2012, 20:10:07 PM
Quote from: Ihateit on December 18, 2012, 11:10:33 AM
@jjk & @randomdev - I used the Net from Firebug, and found out that its looking for an Arimo font from googles server. I dont know if that could be causing any problems, because it cant find the font .woff file.

.woff files are webfonts. Currently pretty popular amoung template developers, but often very sloooow. I've seen many times that they don't load at all, because the server they are stored on is either currently not available or suffers from too many simultanious requests. I would recommend to shut off webfonts completely (probably in your template settings).
Title: Re: Slow Virtuemart 2 site. How to optimize
Post by: bytelord on December 18, 2012, 20:14:27 PM
as jjk said, .woof as taking to long time to load. I remember something similar, please take a look here: http://forum.virtuemart.net/index.php?topic=109146.msg365594#msg365594
It is better to use google online urls for the fonts but in that case also loading time will be HUGE ...
This is a design issue, if you want to use them then use good cache Technics and set the expiration to the fonts to never, also gzip enabled on your apache will help a lot.

Use firebug to examine your site speed or google insight.

Regards

Title: Re: Slow Virtuemart 2 site. How to optimize
Post by: jjk on December 18, 2012, 21:11:51 PM
Quote from: bytelord on December 18, 2012, 20:14:27 PM
Use firebug to examine your site speed or google insight.
Note that 'Google Insight' does NOT measure loading speeds. (Google Insight gives my VM2 shop a very poor 'speed index', however it's actually pretty fast!)

Title: Re: Slow Virtuemart 2 site. How to optimize
Post by: bytelord on December 18, 2012, 22:15:17 PM
QuoteNote that 'Google Insight' does NOT measure loading speeds. (Google Insight gives my VM2 shop a very poor 'speed index', however it's actually pretty fast!)

Have detailed speed analysis and also give suggestions how to improve your site speed :)

https://developers.google.com/speed/pagespeed/insights

After the analysis on the left select Critical Path Explorer
Title: Re: Slow Virtuemart 2 site. How to optimize
Post by: jjk on December 18, 2012, 23:50:15 PM
I knew that one already. I meant that the "PageSpeed Score" doesn't measure the site speed. (mine is 38, but I'm not going to follow Google's suggestions to improve that, because I don't aggree with their suggestions and my site is loading pretty fast despite the low score)
Title: Re: Slow Virtuemart 2 site. How to optimize
Post by: bytelord on December 19, 2012, 00:04:16 AM
ah! yes, sorry. Google gives some tips to follow, for example you site is very speedy but google check the Technics you are using, like CSS/JS compression and minify, sprites combine, replicated images, etc. Now Google uses that scores on SEO also. On heavy sites those technics will help a lot someone to increase his site speed and have better results on SEO, and google insights will help a lot on that. I am using it on big sites a lot, especially where i have 300-700 users at the same time on site i need to reduce a lot the browser requests (60-80%) and also minify/zip (using gzip) the data amount ... that saves me a big amount of money for traffic (payment traffic), server resources, etc ...
Title: Re: Slow Virtuemart 2 site. How to optimize
Post by: Ihateit on December 19, 2012, 10:43:55 AM
Thanks for the answers guys. I have now gotten rid of the webfonts from Googles servers.

A thing i dont understand is the 3 seconds in the top, that is happening before anything starts to load. The "Time to first byte" is very high
http://www.ajytzler.dk/pics/loadtimeNET.jpg (http://www.ajytzler.dk/pics/loadtimeNET.jpg)
It looks like the server isnt responding for 3 seconds, and that makes the site seem really slow. Is it because of my host? I have unoeuro.com as host of all my sites. On different servers though. I dont know how many sites are on each server, and how much traffic are on the other sites, so that could also be the reason, i guess?

I tried the Gzip compression aswell, but it didnt really decrease loading time of the site very much, even though we have a lot of .css and .js.

//AndersJ
Title: Re: Slow Virtuemart 2 site. How to optimize
Post by: franzpeter on December 19, 2012, 14:33:48 PM
A lot of things do not depend on Joomla or VM 2, they depend on poorly written templates. Before I did use a template, which did rely on a certain framework, a lot of javascript code and a part, which did redirect the whole VM 2 fronted from the default place, where the VM theme overrides should reside (i.e templates/yourtemplate/com_virtuemart) into another components folder, which did manage the theme configuration. The page speed (YSlow and Google page speed) did show values about 68 - 69. So it was necessary to use NGINX and mod_pagespeed to achieve something between 78 - 82.
After changing to a warp template and shoplicious theme, I receive a page speed between 82 - 87, just with the standard Joomla cache and without mod_pagespeed and/or NGINX.

Before buying a template I can just recommend to figure out the true url of that template (not the one for the demo, which operates in frames) and do a test with YSlow or PageSpeed. If the template shows bad default values, I cannot get faster by adding individual modules, menus, VM component with categories and products, in contrary it will additionally slow down the server speed. A good measure for slow performance is the number of DOM elements, which a template uses ( YSlow for example shows that). It means, that a template uses a hugh amount of javascripts, a lot of css files and a lot of picture elements, which need to get found all over the web server folders.

A well coded template can help getting good speed results. By default, Joomla and VM 2 are pretty fast, most of the slow downs occur by poorly coded templates!
Title: Re: Slow Virtuemart 2 site. How to optimize
Post by: randomdev on December 20, 2012, 02:19:32 AM
Sometimes joomla components are running scripts etc in the time it takes to first byte.
E.g. An image display component might be creating thumbnails of images/checking if they are cached etc
Title: Re: Slow Virtuemart 2 site. How to optimize
Post by: tampasounds on January 28, 2013, 22:33:28 PM
Try JCH_Optimize
Many tools to unify js and css and images
Your google page speed / insights score will go up.

Hope this helps you


Title: Re: Slow Virtuemart 2 site. How to optimize
Post by: jjk on January 28, 2013, 23:20:58 PM
Quote from: tampasounds on January 28, 2013, 22:33:28 PM
Your google page speed / insights score will go up.
Just in case you don't know - Google page speed doesn't measue loading times. My own site has a very low google page speed index, although the loading time is pretty fast. And I've seen websites, where i.e. a lot of gzip are being used, where the gzips actually slowed down the site significantly. So test it before doing everything that the dumb google tool suggests.
Title: Re: Slow Virtuemart 2 site. How to optimize
Post by: ronjb on January 11, 2014, 14:57:05 PM
just want some clarification, i don't think virtuemart is an ideal shoppingcart plugin if you have 20k products or even more,, or can anybody prove me wrong that virtuemart can load with an ideal speedload even if you have thousands of products..

i have tested 3 sites with same template and same settings, have jch optimize, jotcache, cleancache with diff version of virtuemart and joomla but it seems like that the issue is virtuemart can't really handle thousands of products causing it to load very very slowww..

you can try these sites for speed testing
http://www.circlebcshop.com.au/ - live actual website with VM version 2.0.22a | Joomla 2.5.16 | over 50k products | installed with JCH Optimize and  JotCache plugin
http://demo.circlebcshop.com.au/ - demo site with VM version  2.0.26a | Joomla 2.5.17 | over 50k products installed with System - jbetolo and JotCache plugins

http://demov2.circlebcshop.com.au/ - demov2 with VM version 2.0.22a | Joomla 2.5.16 | default virtuemart sample data |  installed with JCH Optimize and  JotCache plugin... this one loads fast compared to other two because it only has few products..

i really thing its due to virtuemart can't handle much products.. or please can anybody prove me wrong and post a site link with 20kproducts and is loading fast..

Title: Re: Slow Virtuemart 2 site. How to optimize
Post by: jjk on January 11, 2014, 22:46:11 PM
I've just looked at your 'fast' demo, which actually is very slow - using the Firefox browser plugin 'Firebug' in order to see some possible hickups of your site.
Here are a few hints:

1. The time until the first get request is completed usually is around 1.5 seconds or higher. Just for comparison - my own VM2 shop with approximately 600 products is running on a very cheap shared server with without any cache enabled and there the response time usually is around 0.5 seconds, which suggests your server is pretty slow.

2. You are loading a lot of javascript where one is blocking the next one from loading for more than 1 second. In other words, your slidehow, the caroussel, the slider for iphones, the prettyPhoto lightbox in addition to the VM lightbox, the superfish menu, loading of Google fonts, etc. all add up to long page loading times.

3. If possible, use the 'Firebug' plugin for the Firefox browser to locate problems on your website.

As a first step I would suggest to disable most of the 'funky stuff' in your template (did you ask the template provider if they tested it with the latest VirtueMart version? (I think they didn't). In your demo I also noticed a lot of links (eventually sample products provided with your template) which lead to 404 (don't exist) errors, which should be disabled or deleted.

The biggest VM shop I've seen was nearly 800000 products and 20000 are usually no problem.