VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: hayleyv on August 23, 2012, 09:06:46 AM

Title: 350 products showed at once. 20secs to display. Can I speed this up?
Post by: hayleyv on August 23, 2012, 09:06:46 AM
Hi all.  My unusual requirements need me to show 350 products on the page in one go with no pagination.  The thing is, my template is VERY light and just shows product name with link to product detail page and that's it!  No images, no descriptions, no complex conditions etc etc.  It takes about 20 seconds to show this list.   Ideally, the select statement simply needs to do a select product name and then create a product link from the products table, that's it!

- Is there anyway I can optimise the SQL in the backend to speed this list up (perhaps remove any joins etc that may be slowing things down?)

I am running a local WAMP environment, but assume it will be the same when I move to a live host.  Is there any way I can debug to see where the bottleneck is?

Thanks in advance.

Title: Re: 350 products showed at once. 20secs to display. Can I speed this up?
Post by: ivus on August 23, 2012, 09:37:05 AM
Hi hayleyv,

Well you can avoid the bottleneck by writing your own module to pull the products directly using your own sql query rather than hacking the core to find ways of optimising the query (which you'll find is gonna be a huge undertaking).

If you need a starting point, you could download my file and hack that. It doesn't affect the VM core.

http://forum.virtuemart.net/index.php?topic=105653 (http://forum.virtuemart.net/index.php?topic=105653)

Good luck.  ;D
Title: Re: 350 products showed at once. 20secs to display. Can I speed this up?
Post by: jenkinhill on August 23, 2012, 11:54:07 AM
It is difficult to compare local and real hosted site speeds. A real server will be much faster than WAMP - I stopped using localhost for that very reason.
Title: Re: 350 products showed at once. 20secs to display. Can I speed this up?
Post by: balai on August 23, 2012, 17:37:49 PM
jenkinhill is right

MySQL in wamp has disabled by default the query cache.
That means a lot of disk seeks instead of fetching the results from the cache.

This does not happen in a production site