Welcome Guest, Not a member yet? Register   Sign In
Loading Multiple Libraries & Models takes too long time
#1

[eluser]jigarjain[/eluser]
I have been building a large social app on Codeigniter.
There is a function which loads 4 Models & 1 Library (5 resources) and then performs some PHP logic & DB insertions/selection etc. These 5 resources are specific to this function and not required frequently hence cant Autoload it.

By using Codeigniter's Profiling Class i found that the entire function took around 8 seconds to execute whereas the DB queries in it only amounted for 1 second.
The after logging time at many points in my code, i found that out of 8 seconds, around 6.5 seconds were taken for just loading those libraries & models whereas the processing of code took just more than 1 second.

8 second for function execution is just unacceptable and i am unable to figure put the solution. Please help...

The site is hosted on DigitalOcean cloud with 512 MB RAM and only 2 users testing it. Do I need to increase RAM to achieve this. How can I speed this loading time...
#2

[eluser]TheFuzzy0ne[/eluser]
That's a very strange issue. What do these libraries do? I would suggest you profile those, too. It sounds to me like they're doing a LOT of heavy lifting. It could also be a problem with your hardware. How long does it take to just load a view, with no libraries or models?




Theme © iAndrew 2016 - Forum software by © MyBB