Performance of php framework ci

Source: Internet
Author: User
If the framework is used, the performance is poor. why do I output a helloworld? the framework can only respond to 2000 requests per second, and only 400 requests can be returned when I use a CI. since the framework consumes machine memory and performance, why do we need to use the framework. if the framework is used, the performance is poor. why do I output a hello world? the framework can only respond to 2000 requests per second, and only 400 requests can be returned after the CI is used. since the framework consumes machine memory and performance, why do we need to use the framework.

Reply content:

If the framework is used, the performance is poor. why do I output a hello world? the framework can only respond to 2000 requests per second, and only 400 requests can be returned after the CI is used. since the framework consumes machine memory and performance, why do we need to use the framework.

First, you need to understand the purpose of using the framework? Convenient tool library? Good mvc? Standard mode? If you write a request in bare mode, the request is directly sent to the controller only after the request is routed or processed by the framework. this naturally results in performance loss.
I suggest you try phalcon and others. they write extension directly in C, and the speed is incomparable to the stream of ci.

Http://psi.oschina.mopaas.com/web/ this is my use php do inventory, feel the user experience is poor, Click speed is slow. if java is used, the experience and speed will come up. in addition, the php framework is used to reduce the running performance of the software.

The second floor is quite good.
When the framework processes the data to the controller, it has already done a lot of operations such as routing, which will naturally reduce the performance.
The reason for using the framework is standardization, fast, and collaboration.
The framework builds the foundation for you. you no longer need to repeat the wheel and can directly start most of the features you need, so the natural development speed will come up. In addition, the framework has its own specifications. when a team is working collaboratively for development, everyone is familiar with this framework, and the code written naturally will be much better maintained in the future.

Therefore, when you are working on a project, you should select the framework as required or choose not to use the framework.

Compared with traditional process-based performance, a single-entry framework has two sides. The framework has higher development efficiency, robustness, portability, and reuse, what's more, when the hardware is getting cheaper and cheaper, there is still much room for later performance optimization.

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.