CI 묻고 답하기

제목 ci 페이지 로딩속도 더 줄일수 있을까요?
글쓴이 darkninja 작성시각 2014/08/05 16:53:07
댓글 : 2 추천 : 0 스크랩 : 0 조회수 : 13717   RSS
Loading Time: Base Classes  	0.0313
Controller Execution Time ( Main / Index )  	0.1406
Total Execution Time  	0.1719

MEMORY USAGE 
2,410,680 bytes

0.0156  	SELECT `no`, `subject`, `contents`, `reg_date`, `reply_count`, `modify_date`
FROM (`post`)
WHERE `original_no` is null
ORDER BY `modify_date` desc
LIMIT 10 

0.0156  	SELECT `no`
FROM (`post`)
WHERE `original_no` =  '481'
ORDER BY `modify_date` desc
LIMIT 1  
class Main extends CI_Controller {

    public function __construct() {
        parent::__construct();

		$this->load->helper('main');
		$this->load->helper('form');
		$this->load->helper('auth');

		$this->load->model('latest_model');
		$this->load->model('tags_model');
        $this->load->model('nestedset_model');
        $this->load->model('category_model');
		
        $this->post_table_name = 'post';
        $this->comment_table_name = 'post';

        $this->data = get_auth_data();

        $profile = (ENVIRONMENT == 'development') ? TRUE : FALSE;
        $this->output->enable_profiler($profile);
    }

    public function index() {
		$head_data = array(
			'title' => 'blog main',
		    'username' => $this->data['username'],
 		);
		$view_data = array(
			'recent_posts'   => $this->latest_model->recent_posts(),
			'recent_comments' => $this->latest_model->recent_comments(),
			'post_table_name' => $this->post_table_name,
			'comment_table_name' => $this->comment_table_name,
		);
		$tail_data = array(
            'ztree1_json' => $this->category_model->get_JSON("name"),
			'tagcloud' => $this->tags_model->get_ahref(),
			'satimg' => get_satimg(true),
		);
		
		$this->load->view('main_h', $head_data);
		$this->load->view('main_view', $view_data);
		$this->load->view('main_t', $tail_data);
    }
	<!--link rel="stylesheet" type="text/css" href="<?=CSS_DIR?>/bootstrap.min.css" /-->
	<!--link rel="stylesheet" type="text/css" href="<?=CSS_DIR?>/common.css" /-->
	<!--link rel="stylesheet" type="text/css" href="<?=CSS_DIR?>/zTreeStyle.css" /-->
	<!--link rel="stylesheet" type="text/css" href="<?=CSS_DIR?>/tagcloud.css" /-->

	<!--script type="text/javascript" src="<?=JS_DIR?>/jquery-1.11.1.min.js"></script-->
	<!--script type="text/javascript" src="<?=JS_DIR?>/jquery.cookie.js"></script-->
	<!--script type="text/javascript" src="<?=JS_DIR?>/json/json_parse.js"></script-->

	<!--script type="text/javascript" src="<?=JS_DIR?>/bootstrap.min.js"></script-->
	<!--script type="text/javascript" src="<?=JS_DIR?>/bootstrap-hover-dropdown.js"></script-->
	<!--script type="text/javascript" charset="utf-8">
		// very simple to use!
		$(document).ready(function() {
			$('.js-activated').dropdownHover().dropdown();
		});
	</script-->

	<!--script type="text/javascript" src="<?=JS_DIR?>/jquery.ztree.core-3.5.min.js"></script-->
	<!--script type="text/javascript" src="<?=JS_DIR?>/jquery.tagcloud.js"></script-->

	<!--[if lt IE 9]>
		<!--script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
		<!--script src="<?=JS_DIR?>/html5shiv.js"></script-->
		<!--script src="<?=JS_DIR?>/respond.min.js"></script-->
    <![endif]-->

	<!--script type="text/javascript">
		window.onload = function() { 
			var zTree = $.fn.zTree.getZTreeObj("ztree_category");

			var seg_controller = '/<?php echo $this->uri->segment(1); ?>'; // controller
			var node = zTree.getNodeByParam("url", seg_controller);
			if (node) {
				$("#ztree1_form_input_info" ).val( seg_controller +' '+ node.name );
				zTree.selectNode( node, 0);
			}
		};
		
		$(document).ready(function(){
			var setting = {	
				cookie: {
					saveState: true,
				}	
			};
			$.fn.zTree.init($("#ztree_category"), setting, json_parse('<?=$ztree1_json?>'));
		});
	</script-->

	<!--script type="text/javascript" charset="utf-8">
		$(document).ready(function(){
			$("#tagcloud a").tagcloud({
			});
			$('#tagcloud_form').submit(function() {
				$("#tagcloud a").tagcloud({
					size: {
						start: parseInt($('#minFont').val()), 
						end: parseInt($('#maxFont').val()), 
						unit: $('#tagcloud_unit').val()
					}, 
					color: {
						start: "#"+$('#startColour').val(), 
						end: "#"+$('#endColour').val()
					}
				});
				return false;
			});
		});
	</script-->
0.1초 이내로 줄일려면 포럼형태로 가야 될까요?
 다음글 모바일 CI 구해봅니다 (2)
 이전글 컨트롤러 파라미터 기본값 관련 (13)

댓글

한대승(불의회상) / 2014/08/05 16:55:40 / 추천 0
하드웨어를 건드리지 않고 하시려면 캐쉬를 쓰는 방법이 가장 빠를것 같습니다.
darkninja / 2014/08/05 17:15:11 / 추천 0
0.1초대에서는 잘 안 내려 가네요...
고물컴에서 0.1초 아래로 끌어내릴려면
많은 삽질이 ...
답변 감사합니다!