简体   繁体   English

如何使用Codeigniter优化PHP应用程序?

[英]How to optimize php app with codeigniter?

I have some very large processing being done in a php application. 我在php应用程序中做了一些非常大的处理。

I'd like to use one of those scripts/programs which analyze the execution and show you which line of code, or which function, took how much time processing, etc. 我想使用其中一个脚本/程序来分析执行情况,并向您显示哪一行代码或哪个函数花费了多少时间等。

Any recommendations? 有什么建议吗?

I'm using the codeigniter php framework so anything that works with it out of the box would be nice, but i'm open to all suggestions. 我使用的是codeigniter php框架,因此开箱即用的任何东西都很好,但是我愿意接受所有建议。

What you are looking for is a profiler. 您正在寻找的是探查器。

XDebug has a profiler that i've heard good things about, but haven't tried though. XDebug有一个探查器 ,我听说过一些不错的东西,但是没有尝试过。

There is also the NuPHP Profiler , but i've heard nothing about it. 还有NuPHP Profiler ,但我对此一无所知。

CodeIgniter has a built-in profiler . CodeIgniter具有内置的探查器 By default, it shows memory usage, time to load base classes, controller execution time, total execution time, and database query time. 默认情况下,它显示内存使用情况,加载基类的时间,控制器执行时间,总执行时间和数据库查询时间。

You can use it along with CodeIgniter's Benchmark class to time other sections of code. 您可以将其与CodeIgniter的Benchmark类一起使用,以计时其他代码段。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM