Welcome Guest, Not a member yet? Register   Sign In
Performance of big controller files
#1

[eluser]sqwk[/eluser]
Theoretically what would be faster?

- One big controller for one sections with lots of functions

- Or multiple controllers for one section, which are mapped through routes?

Or does it not matter at all?
#2

[eluser]jedd[/eluser]
[quote author="squawk" date="1268709121"]
Or does it not matter at all?[/quote]

Option C certainly gets my vote. Smile


Quote:Theoretically what would be faster?

Oh - do you mean faster to load, execute, parse, write, debug or maintain?

It's pretty easy to start writing up some large controllers that just contain repeated and pointless sections of code to see how much overhead there is in loading a 1,000 line controller. My gut feel is it's going to be trivial, unless you're doing very high performance / high load sites.

Given that it's hard to make maintenance or debugging activities easier by throwing a few hundred (insert currency of choice)'s at the problem of badly designed architecture - you're better off designing things to be easier to maintain, than to be slightly faster performing. (With the same caveat as before.)




Theme © iAndrew 2016 - Forum software by © MyBB