A brief introduction to the accelerated exploration of PHP applications

Source: Internet
Author: User
Tags execution
Procedure (i) Introduction
This article attempts to explore all aspects of the acceleration of PHP programs, including the necessity and the specific measures taken from different angles. Hope to help readers understand the PHP program acceleration, and apply to the actual.

(b) whether there is a need for acceleration?
This question sounds a little silly. In this era, few people doubt that time is the most valuable asset, especially in the commercial market. The faster the program executes, the more time the user saves, so that your program can serve users with less time and server resources, resulting in more benefits.
I think for most people (myself included), many Web projects are done in a very stressful time, often without careful thought and rigorous testing. When a new Web project is started. A lot of people are building that "fast and messy" application that lacks the time necessary to adjust and improve the code, and then optimization and acceleration are the steps we have to take.
It should be noted, however, that not all programs need to be accelerated.
Optimizing completed code is a waste of time, and the best way to do this is to be aware of efficiency when writing code, and then just optimize the part that really needs to be optimized after you complete the project. Generally a program will only have a few impact on the speed of the bottleneck, to find out and solve it, the program can run well. In addition, when the implementation of inefficiencies, first of all, to use the overall perspective to find out the main factors affecting efficiency, rather than rigidly adhere to the details-such as data volume is too large, server bandwidth is not enough, or hardware configuration is too low, in such cases, optimize the code does not help.
Also, don't be too picky when there are no obvious signs of slow execution, and waste time trying to improve some very detailed code. With these times, you can complete another project or perform an extended function for the original project. Of course you can joke that I am not responsible enough, do not do a good job, I can also say you are a perfectionist.
In summary, before you decide to speed up your PHP program, ask yourself if it's necessary.

(c) How to speed up?
Before you answer the question "How to speed up," you need to answer the following two small questions:
1. Which part of your program is slow?
2. What are some aspects of PHP that can be considered for acceleration?
The first small problem obviously I can't give you the answer, but I suggest you use "test Script Execution Speed" method to solve. Only by finding the bottleneck of speed limit can we consider how to solve it.
The second small question I probably answer is: code optimization, compression output, content cache output, function cache output, accelerator/cache tool software. If you know more, please tell me.

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.