News:

Looking for documentation? Take a look on our wiki

Main Menu

Slow Virtuemart 2 site. How to optimize

Started by Ihateit, December 17, 2012, 11:14:53 AM

Previous topic - Next topic

Ihateit

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

For the query part: 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 :-)

jjk

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.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

Milbo

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.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

randomdev

#3
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 ##########

Ihateit

#4
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

Ihateit

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?

Ihateit

I printscreened this for you. Is it all of my .js and .css taking up the loadtime??

http://www.ajytzler.dk/pics/loadtimeNET.jpg

jjk

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).
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

bytelord

#8
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

Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

jjk

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!)

Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

bytelord

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
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

jjk

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)
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

bytelord

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 ...
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

Ihateit

#13
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
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

franzpeter

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!