Welcome Guest, Not a member yet? Register   Sign In
CI Profiling - not sure what could be slowing down one of my controllers so much
#1

[eluser]tinawina[/eluser]
I have two controllers that are almost identical in the libraries and helpers they use. They differ in the variables we feed them to get the query results and displays we need but those aren't that different either. Might be easier to just let you look at these two areas in our developing site -- I've turned on benchmarking to try to track down this problem:

Geography: http://www.ilaborate.org/geography

Issue areas: http://www.ilaborate.org/issues

If you click on "North America" or "United States" from the Geography index page will give you a profile with about 8-9,000 results. These return very quickly.

If you click on "Education and Literacy" in the Issue areas index page, the page returns about 2,000 results. This is the biggest result set in the Issue Areas section. The load time is super duper long -- many times longer than for "North America" which has 4 times the results to process and display.

I can't figure out what the drag is or where it's coming from. I have set up benchmarking on both the issues and geography controllers. I set up three flags:

1) "construct" for the controller construct
2) "controller_view" for the method that takes the data and merges it with the template
3) "controller_output" for the method that puts everything together from libraries, queries, etc. This is the one that takes the most time according to the benchmark data.

As you can see, these pages show the same types of data, the query is pretty much the same. But for some reason displaying issue profiles is way slower than the geo display. Does anyone have any ideas as to what this could be?

Thanks for any ideas!
#2

[eluser]Mirge[/eluser]
Without seeing any actual code, it might be difficult :o(
#3

[eluser]tinawina[/eluser]
Ok - but what code should I post? I have a LOT of libraries called into this controller in the construct. Some are huge. Would I post all 15 or 20 file dependencies? Or just the one method -- the one tracked as control -- that is clearly where the load issue is occurring when you look at the benchmark data?
#4

[eluser]Mirge[/eluser]
If you'd like, I can help you debug it in your dev environment.
#5

[eluser]tinawina[/eluser]
Thanks for that offer. I actually just realized that I can get much more granular with the benchmarking tags and am zero-ing in on the code that is dragging things down. If we can't figure this out, I may be in touch!
#6

[eluser]Mirge[/eluser]
No worries




Theme © iAndrew 2016 - Forum software by © MyBB