VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: OriyanJ on March 03, 2016, 09:30:37 AM

Title: Slow loading time with "Top Level Category"
Post by: OriyanJ on March 03, 2016, 09:30:37 AM
I want to show products by month. So I've created a new VirtueMart category layout that show "Top Level Category". Only when I choose "Top Level Category", the loading time of the page is awful (up to 44,000 ms).
When creating a menu for a other categories, loading is better. Any idea why?

http://1-2-3-ready.com/new/calendar (http://1-2-3-ready.com/new/calendar)
http://1-2-3-ready.com/new/search-tours-bu-calendar (http://1-2-3-ready.com/new/search-tours-bu-calendar) (with a plug-in)
Title: Re: Slow loading time with "Top Level Category"
Post by: Ghost on March 03, 2016, 09:53:01 AM
Probably because you have a high amount of items on a single page. Enabling pagination should fix that. Or use debug to see what exactly is slow, maybe some queries can be removed.
Title: Re: Slow loading time with "Top Level Category"
Post by: OriyanJ on March 03, 2016, 10:01:10 AM
You, my friend, are a hero. Pagination provide me with a quick solution. But what if I prefer not using pagination? I'm sure someone here is smarter than me to realize what causing page to load slow.
Title: Re: Slow loading time with "Top Level Category"
Post by: GJC Web Design on March 03, 2016, 10:15:45 AM
It is simply a question of server resources -- more items -- more time

the simplest improvement would be a better resourced server

the response time is extremely slow at 17 seconds here before the server responds

although the shorter page is hardly better

I would turn on Joomla debugging and check for duplicate queries, check if server memory can be increased etc
But IMHO problems like this are cured by a decent host/server
Title: Re: Slow loading time with "Top Level Category"
Post by: OriyanJ on March 03, 2016, 11:20:53 AM
GJC Web Design, but the rest of the pages load fine.
Title: Re: Slow loading time with "Top Level Category"
Post by: GJC Web Design on March 03, 2016, 12:07:54 PM
hard to know which ones are VM with sef on but some are relatively fast - ~ 2-3 sec here.. (btw thats slow.. should be less than a sec)

all points to a slow under resourced server that stalls as soon as any heavy lifting is required..

but do the research as above.. theres no settings that will cure any of this
Title: Re: Slow loading time with "Top Level Category"
Post by: OriyanJ on March 03, 2016, 12:19:58 PM
When Joomla's "Debug System" is ON I get 500 Server error.
Title: Re: Slow loading time with "Top Level Category"
Post by: GJC Web Design on March 03, 2016, 17:16:36 PM
probably not enough memory to display all the debug.. which points to->

Quoteslow under resourced server that stalls as soon as any heavy lifting is required..
Title: Re: Slow loading time with "Top Level Category"
Post by: OriyanJ on March 06, 2016, 07:13:40 AM
I found this -
"PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 491520 bytes) in /home/ready123/public_html/new/components/com_virtuemart/sublayouts/customfield.php on line 450"

And when I turn pagination on, everything is okay. Might be memory allocation problem.
Title: Re: Slow loading time with "Top Level Category"
Post by: Ghost on March 06, 2016, 13:37:36 PM
You're running out of memory when debug is enabled. You can configure debug plugin not to show DB queries, this will allow you to at least see profiling information. Although debug may not be that useful without DB information. 128MB is pretty low even for shared hosting. Most hosts have 256MB per process as a minimum. You can try increasing memory limit through .htaccess/.user.ini/php.ini.

If you're not showing customfields in category page, you can turn off this setting in VM config (uncheck "Show product customfields in browse views").