Welcome Guest, Not a member yet? Register   Sign In
Controller Execution Time
#1

Hi!

All my web pages rendering very slow performance even if the page has no content. All my pages rendering same performance. I'd tried to check profiler and here's the result.
[Image: YmIWm.jpg]
[Image: NyHdc.jpg]
I'd notice also that even the blank page execute all the database queries in all Model. How can i prevent to execute those queries. above is the result profiler gives in every pages.

here's my code in controller

Code:
<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class User extends CI_Controller {
    public function __construct(){
        parent::__construct();

        $this->load->model('M_user');
        $this->load->model('M_global');
    }
    function notify()
    {
        echo $this->M_global->countWatchDog();
    }
    public function index()
    {

        $nodes_title = "Others";
        $nodes = $this->uri->segment(1).'/'.$this->uri->segment(2);
        $nodes = $this->M_user->subModuleNodes($nodes);
        $category = null;
        $data = array (
            "responsibility" => $category,
            "image_path" => $this->session->userdata('image_path'),
            "username" => $this->session->userdata('username'),
            "user_type" => $this->session->userdata('user_type'),
            "nodes" => $nodes,
            "nodes_title" => $nodes_title,
            "notification" => $this->M_user->usersNotification(),
            );
        $dataContent = array (

            );
        if (!$this->session->userdata('username')) {
            redirect(base_url().'login', 'refresh');
        }
        $this->load->view('header');
        $this->load->view('navigation',$data);
        $this->load->view('welcome_message',$dataContent);
        $this->load->view('footer');
    }

Please help me. Thank you in advance.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB