Is the maximum LOC(LINE OF CODE) effect on controller class response or not...is this thing matter..
1.a)Controller: LOC 120, public functions exist 3.
b)Controller: LOC 120, public functions exist 3.
c)Controller: LOC 120, public functions exist 3.
2.) Controller LOC 720, pubic function 10.
it handle all the things in the same class.
Which one is better?
Codeigniter has benchmarking tools built in. You can use that to determine which one is faster.
But if your application is slow, it is very unlikely to be the number of lines in a controller class or the number of methods. More likely it would be database queries, API calls, etc. In which case you should look into optimizing those things or cache the results.
You should organize your code in a way that makes sense and is easy to read while following the MVC pattern.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With