Welcome Guest, Not a member yet? Register   Sign In
page loading very slow
#1

[eluser]aztack[/eluser]
hi,everyone, i'm new to CI. I was coding a small website.

The whole site loading very slow even on localhost

there is only one single controler:

class Portal extends Controller_base {
function Portal() {
parent::Controller_base ();
$this->load->model ( 'Article_class_Model', 'aclass' );
$this->load->model ( 'Article_Model', 'art' );
$this->load->model ( 'User_Model', 'user' );
$this->load->model ( 'Message_Model', 'msg' );
$this->load->model ( 'Privilege_Model', "privilege" );
$this->load->model ( 'Call4article_Model', 'c4a' );
$this->load->model ( 'Recommend_Model', 'recom' );
$this->load->library ( 'pagination' );
$this->load->library ( 'input' );
}

function view($class = '', $from = 1) { .. }

...
}

is that loading many models cause the problem?
#2

[eluser]sybrex[/eluser]
The Profiler Class could help you to find out.
#3

[eluser]aztack[/eluser]
Thank you sybrex!
#4

[eluser]John_Betong[/eluser]
 
First try moving all the links to your Javascript files to immediately before </body></html>
 
Also try Yslow for Firefox
 
https://addons.mozilla.org/en-US/firefox/addon/5369
 
 
 




Theme © iAndrew 2016 - Forum software by © MyBB