Hi,
the cart on my local website takes about 300 ms to calculate the total price of the cart (even if it is empty).
$data=$plg->prepareAjaxData(); -> 300 ms*
- $this->_cart->prepareCartData(false); -> 292 ms
- - $calculator->getCheckoutPrices($this); -> 283 ms
- - - $this->calculateShipmentPrice(); -> 58 ms
- - - $this->calculatePaymentPrice(); -> 220 ms
- - - - $varsToPush = $this->getVarsToPush (); (standard.php) -> 47 ms
I was wondering : do you think the optimization of this lies elsewhere than in the code ? Maybe some misconfiguration ?
Because, obviously, the logical steps required to calculate the prices on my simple website wouldn't require so much time at all. Should i hire someone to simplify the virtuemart general code, or is there something else i could do ?
Greenhillz.
Versions? URL? Which host? http://forum.virtuemart.net/index.php?topic=79799.0
Hi,
thanks for the reply and sorry for the lack of information, the timings are for the wamp version, but here is the website :
http://dosagile.fr/
VirtueMart 3.0.9.4
Host : OVH France
Joomla! 3.4.3
Wamp is always far slower than a real optimised server, so any figures obtained with localhost are not worth considering.
Tha AJAX refresh of the cart page on the live site is a little on the slow side, but your template is packed with css & js files which probably have an impact on that. Try switching to the Protostar template to see how quick the cart is there.
Agree .. I find WAMP and XAMP are always dog slow on even the fittest local PC compared to a good host server
Thanks a lot ! I didn't think that the template could be responsible, i thought the code "getcartprices" would only get the prices. I'm digging this way. And my Wamp is actually going faster because of the hardware difference.
(on protostar template, the cart style stays the same, and takes even more time to load, and bugs. ^^ This error must be human made though, i don't really know how to decently switch templates)