Welcome Guest, Not a member yet? Register   Sign In
Extremely slow speed on my site using codeignitor... is this normal?
#21

[eluser]Slowcheetah[/eluser]
494 database queries for the frontpage? That's a lot.

If i look at the content of the page i think you don't need that many queries.

What are these queries for?
Code:
SELECT *
FROM (categories)
WHERE `parent_id` = '338'

p.s. if you don't want link to your site directly (because this is a public forum) you can use http://bit.ly, or any other link shortner.
#22

[eluser]WanWizard[/eluser]
It's clearly a server side issue.

Although your homepage is almost 2Mb in total uncompressed, it has no problem arriving here in a timely fashion (I have a 100Mbps pipe to the internet).
Firebug tells me that it takes 3.07sec before the reponse on the GET www.coupunbunga.com is received. That corresponds with the processing time reported by the profiler.

I had to swallow though when I saw the query list. Ouch. I see a lot of repetition, and lots of them queries with multiple joins. Clearly a sign of a design issue, one that might be difficult to fix...
#23

[eluser]alitech[/eluser]
Pardon my ignorance but what is a "join"? I can see now after your comments that it makes an unusually high number of requests and also uses a lot of memory.

When SERPs come on to the site, they kill it completely.

You also mention its a design issue? Design as in UI or designing the DB / Codebase?

I think there may be references to queries that are not really required on the homepage. I am not sure about the repititions but yes, it seems logical to remove them.

To pose a question to you all, once you activate profiling on your sites, how many requests do you usually see?

My site has a lot of content and a lot of pages but I dont consider the site to be heavyweight. What should be the number of requests for a site my size compared to a heavyweight site?
#24

[eluser]n0xie[/eluser]
[quote author="alitech" date="1276710730"]
My site has a lot of content and a lot of pages but I dont consider the site to be heavyweight. What should be the number of requests for a site my size compared to a heavyweight site?[/quote]
I think you should be looking at something between 25-50 queries (which still is a lot imho) which you should be able to bring down to maybe 10 with proper caching. To give you an idea, a frontpage of one of our rather busy sites uses about 30-40 queries if it's uncached. With caching we bring it down to 0-10 queries. The only issue we have is that it's hard to cache queries for logged in users.

You should take a look at Phil's cache library. I think you should be able to remove at least half of the queries just using a basic caching mechanism...
#25

[eluser]cahva[/eluser]
I also got that many queries with my ecommerce site on large categories. Phil's cache library is the way to go for starters.. Its very easy to implement that caching afterwards(I added the caching also after I finished the ecommerce project).

Looking at the queries itself, there is room for improvement on the database design also but as I said, for starters adding caching will help a lot as the queries will drop near zero.
#26

[eluser]alitech[/eluser]
Thank you. Caching is on top of my list right now. Would it be asking for too much to see your sites please?

You can apply bit.ly on your URLs.
#27

[eluser]cahva[/eluser]
I dont mind revealing the url as I've done it already here in the forums Smile
www.fihasia.com

Its only in finnish atm.
#28

[eluser]Myles Wakeham[/eluser]
[quote author="Cshamoh" date="1276220653"]
Quote:I am not a techie (...)
From more biz POV...
I'm not sure how not techie you are not, but as you already know what to do more less, it would now best to hire someone and have a chance to have it solved ('workarounded', even temporarily) within one day and save your business Smile Additionally you might also learn if you application will stand the change you mention without smaller or bigger redesign (and redevelopment).

There is one thing sure - if its going to grow it will need constant maintenance...[/quote]

+1 to this. This is the wisest response to your post so far. The size of your site, rate of growth, etc. is a clear sign that you need to hire a pro to get this under control. Think of it this way... Its a really great problem to have. It could be worse. You could have a really fast performing site, and no-one goes there.

And to add one more cliche that fits here, "You pay peanuts and you get monkeys". No offence to your skills, but I think you've left the "I'm not a techie" camp and you need a techie to get involved.

Myles
#29

[eluser]caustic[/eluser]
cut your code monkey`s hands fuckin off.
don`t know about UK, i`ll be probably raped for this: http://www.couponbunga.com/stores (almost 32Mb of memory consumption for each script) in my case. and, maybe, clasterisation will not help. only code refactoring as n0xie said.
#30

[eluser]metaltapimenye[/eluser]
enabling profiler to benchmark and analyzing your query
Code:
$this->output->enable_profiler(TRUE);

else.. stop to put every plugin/helper on your instance (if its wut u've done)

IMHO




Theme © iAndrew 2016 - Forum software by © MyBB