Codeigniter model loading -
I have 4 models in 4 codinators I want to load these models in my controller's manufacturer because they are used several times Has it been effective or will the site slow down?
Of course, the loading code makes the site slow as much as the PHP engine has to do, the more it is Will take for you. All you need to ask yourself is that the model is loading and how often it is being used.
If your model will be used on every page, keep it in auto-loader.
If your model is used in every mode of controller (or if it is a small model, in more than one method), then put it in the constructor.
If your model is only being used in one method, put it in that method.
The main thing to remember is that a model is loading, it will slow down the site, if it is a ghazal line line line. If this is the average size (4kb less) then it is actually nothing more than that.
Take a look to make your model code even more efficient.
Comments
Post a Comment