I am working on a large project, made in Codeigniter and I am wondering if there is difference in the performance of an controller dependent, where the required models are loaded.
The question:
- should all models be loaded in the constructor,
- or in the specific functions that use them,
- or partially both of those approaches should be utilized, ie, universally used models throughout the controller loaded in the constructor and those rarely used, to be loaded only when required ?
// Bear in mind, that the application I am working on, has mostly large models, with more then just the insert/update/del functions in them ...
// p.s. I've searched the net on the topic, but failed find anything specific in that subject.