slowdown after many cats added

slowdown after many cats added

Postby twitch » Mon Feb 22, 2010 6:32 pm

Ok so the site slows down when there are a lot of categories added you can see this at http://www.2buyonlinenow.com is there anything we can do about this? right now im at about 7 second load times and I noticed the times get worse the more I added. Hope this helps you out you have a great script here. I hope this takes off for you. as long as the speed can be worked on this will be by far the best amazon affiliate script out there.

the other site this is running on is http://www.buyaipad.info and it loads pretty fast. but only has a few categories.
twitch

 
Posts: 254
Joined: Sat Feb 20, 2010 12:09 am

Re: slowdown after many cats added

Postby twitch » Mon Feb 22, 2010 9:15 pm

So after finishing up the store the site is almost unvisitable http://www.2buyonlinenow.com takes sometimes 15-20 seconds to load. I hope we can get a resolution to this or I'll be sad.
twitch

 
Posts: 254
Joined: Sat Feb 20, 2010 12:09 am

Re: slowdown after many cats added

Postby admin » Tue Feb 23, 2010 9:28 am

Hi,

I think I may have discovered the cause. It's quite embarasing... but basically if your site had 1000 categories it would execute the following SQL statement 1000 times!!!

Code: Select all
SELECT * FROM ans_categories WHERE display = 1 ORDER BY page_order, node_name


I have updated this so now it will do what it is supposed to do which is to only execute it once, this has so far proved better results and would definitely explain why your site gets slower the more categories you add!
User avatar
admin
Site Admin
 
Posts: 462
Joined: Sun Nov 22, 2009 7:24 pm

Re: slowdown after many cats added

Postby admin » Tue Feb 23, 2010 10:43 am

Hi,

Just to add to what I previously applied, I have now enabled database caching for category calls.

In 1.1, when you load a page all queries related to category data are cached for 5 minutes. When you create,delete,sort or edit a category the cache will be reset.
User avatar
admin
Site Admin
 
Posts: 462
Joined: Sun Nov 22, 2009 7:24 pm

Re: slowdown after many cats added

Postby twitch » Tue Feb 23, 2010 4:39 pm

Awesome glad you were able to tell what was going on. cant wait for 1.1 to drop. Is there a way so we can make the cache time maybe a few hours or so or even adjustable?
twitch

 
Posts: 254
Joined: Sat Feb 20, 2010 12:09 am

Re: slowdown after many cats added

Postby admin » Tue Feb 23, 2010 6:22 pm

Yes, that would be better.

I'll make it adjustable and default it to 10 mins.
User avatar
admin
Site Admin
 
Posts: 462
Joined: Sun Nov 22, 2009 7:24 pm

Re: slowdown after many cats added

Postby twitch » Tue Feb 23, 2010 9:07 pm

You are the man.
twitch

 
Posts: 254
Joined: Sat Feb 20, 2010 12:09 am


Return to Bug Reports

Who is online

Users browsing this forum: No registered users and 1 guest

cron