Statistics ThinkPHP3.2.3 loaded files

Source: Internet
Author: User

Add the ThinkPHP3.2.3 Portal file index.php to a function getincludefiles, and the file contents become as follows:

1<?PHP2 // +----------------------------------------------------------------------3 // | thinkphp [WE CAN do IT JUST THINK]4 // +----------------------------------------------------------------------5 // | Copyright (c) 2006-2014 http://thinkphp.cn All rights reserved.6 // +----------------------------------------------------------------------7 // | Licensed (http://www.apache.org/licenses/LICENSE-2.0)8 // +----------------------------------------------------------------------9 // | author:liu21st <[email protected]>Ten // +---------------------------------------------------------------------- One  A //Application Portal File -  - //Detect PHP environment the if(Version_compare(php_version, ' 5.3.0 ', ' < ') die(' Require PHP > 5.3.0! ')); -  - //Open Debug mode suggest the development phase to open the deployment phase comment or set to False - Define(' App_debug ',True); +  - //defining the App catalog + Define(' App_path ', './application/')); A  at //Introducing the thinkphp entry file - require'./thinkphp/thinkphp.php '; -  - //There 's no code behind the pro ^_^, it's so simple. -  - getincludefiles (); in  - functionGetincludefiles () { to     $files=Get_included_files(); +  -     $fileCount=Count($files); the     Echo"ThinkPHP3.2.3 Framework co-loading {$fileCount} Files <br/>\n "; *     $i= 0; $     foreach($files  as $file) {Panax Notoginseng         $i++; -         Echo"{$i}, Included file {$file}...&LT;BR/>\n "; the     } + } A?>

Accessing http://localhost:81/research/thinkphp_3.2.3_full/index.php in the browser

The output is as follows:
ThinkPHP3.2.3 Framework loads 27 files
1, Included file E:\myphp\research\thinkphp_3.2.3_full\index.php ...
2, Included file E:\myphp\research\thinkphp_3.2.3_full\ThinkPHP\ThinkPHP.php ...
3, Included file E:\myphp\research\thinkphp_3.2.3_full\ThinkPHP\Library\Think\Think.class.php ...
4, Included file E:\myphp\research\thinkphp_3.2.3_full\ThinkPHP\Library\Think\Storage.class.php ...
5. Included file E:\myphp\research\thinkphp_3.2.3_full\ThinkPHP\Library\Think\Storage\Driver\File.class.php ...
6, Included file E:\myphp\research\thinkphp_3.2.3_full\ThinkPHP\Mode\common.php ...
7, Included file E:\myphp\research\thinkphp_3.2.3_full\ThinkPHP\Common\functions.php ...
8, Included file E:\myphp\research\thinkphp_3.2.3_full\ThinkPHP\Library\Think\Hook.class.php ...
9, Included file E:\myphp\research\thinkphp_3.2.3_full\ThinkPHP\Library\Think\App.class.php ...
10, Included file E:\myphp\research\thinkphp_3.2.3_full\ThinkPHP\Library\Think\Dispatcher.class.php ...
11, Included file E:\myphp\research\thinkphp_3.2.3_full\ThinkPHP\Library\Think\Route.class.php ...
12, Included file E:\myphp\research\thinkphp_3.2.3_full\ThinkPHP\Library\Think\View.class.php ...
13. Included File E:\myphp\research\thinkphp_3.2.3_full\ThinkPHP\Library\Behavior\BuildLiteBehavior.class.php ...
14. Included File E:\myphp\research\thinkphp_3.2.3_full\ThinkPHP\Library\Behavior\ ParseTemplateBehavior.class.php ...
15. Included File E:\myphp\research\thinkphp_3.2.3_full\ThinkPHP\Library\Behavior\ ContentReplaceBehavior.class.php ...
16, Included file E:\myphp\research\thinkphp_3.2.3_full\ThinkPHP\Conf\convention.php ...
17, Included file E:\myphp\research\thinkphp_3.2.3_full\Application\Common\Conf\config.php ...
18, Included file E:\myphp\research\thinkphp_3.2.3_full\ThinkPHP\Lang\zh-cn.php ...
19, Included file E:\myphp\research\thinkphp_3.2.3_full\ThinkPHP\Conf\debug.php ...
20, Included file E:\myphp\research\thinkphp_3.2.3_full\ThinkPHP\Library\Think\Log.class.php ...
21, Included file E:\myphp\research\thinkphp_3.2.3_full\Application\Home\Conf\config.php ...
22. Included File E:\myphp\research\thinkphp_3.2.3_full\ThinkPHP\Library\Behavior\ ReadHtmlCacheBehavior.class.php ...
23. Included File E:\myphp\research\thinkphp_3.2.3_full\Application\Home\Controller\IndexController.class.php ...
24, Included file E:\myphp\research\thinkphp_3.2.3_full\ThinkPHP\Library\Think\Controller.class.php ...
25. Included file E:\myphp\research\thinkphp_3.2.3_full\Application\Runtime\Cache\Home\ 20914c0f075f91df3579ffbdf5180b02.php ...
26. Included File E:\myphp\research\thinkphp_3.2.3_full\ThinkPHP\Library\Behavior\ WriteHtmlCacheBehavior.class.php ...
27. Included file E:\myphp\research\thinkphp_3.2.3_full\ThinkPHP\Library\Behavior\ ShowPageTraceBehavior.class.php ...

Summarize:
Just access the portal file index.php, without completing any functions, loaded 27 files, if you want to invoke the specific business logic to load the file will be more, and the business may also call the database, NoSQL, file system, Message Queuing system, etc. A request may take longer from the beginning to the end.

Performance is particularly important for high-concurrency, highly available, high-performance distributed systems, where the use of frameworks may improve development efficiency, but may have some impact on performance, so some large companies use their own frameworks or frameworks to develop projects.

Extended reading:
HTTP://WWW.BAIDU.COM/S?WD=THINKPHP%20 Performance Optimization
HTTP://WWW.SOGOU.COM/WEB?QUERY=THINKPHP%20 Performance Optimization
HTTPS://WWW.SO.COM/S?Q=THINKPHP%20 Performance Optimization
Http://www.baidu.com/s?wd= Program%20 Performance optimization
http://www.sogou.com/web?query= Program%20 Performance optimization
https://www.so.com/s?q= Program%20 Performance optimization

Statistics ThinkPHP3.2.3 loaded files

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.