Introduction to PHP application acceleration exploration

Source: Internet
Author: User
(1) Introduction
This article attempts to explore various aspects of PHP program acceleration, including the necessity and specific measures taken from different perspectives. Hope to help readers understand the PHP program acceleration and apply it to reality.
(2) is acceleration required?
It sounds silly. In this era, few people doubt that time is the most valuable asset, especially in the commercial market. The faster the program runs, the more time the user saves. In this way, your program can use less time and server resources to serve the user, thus generating more benefits.
I think for most people (including myself), many WEB projects have been completed in a very short time and are usually not carefully considered and strictly tested. Start a new WEB project. Many people are building fast and messy applications and lack the necessary time to adjust and improve code. Optimization and acceleration are the measures we must take.
However, not all programs require acceleration.
It is a waste of time to optimize the completed code. The best way is to pay attention to the efficiency when writing the code. After the project is completed, only the part that needs to be optimized is optimized. Generally, a program only has a few bottlenecks that affect the speed. You can find and solve them to run the program well. In addition, when the execution efficiency is low, we should first look at the overall situation to find out the main factors that affect the efficiency, rather than sticking to the details-for example, the data volume is too large and the server bandwidth is insufficient, or the hardware configuration is too low. In this case, optimization code is useless.
In addition, when there are no obvious signs of slow execution in the program, do not be too picky. It is a waste of time to improve some very detailed code. With this time, you can complete another project or complete an extension function for the original project. Of course, you can joke that I am not responsible enough to do my job well. I can say that you are a perfectionist.

In summary, before you decide to speed up your PHP program, ask yourself if it is necessary.
(3) how to accelerate?
Before answering the question "how to accelerate", you need to answer the following two questions:
1. Where is your program slow?
2. Which of the following aspects can PHP accelerate?
Obviously, I cannot give you the answer to the first small question, but I suggest you use the "test script execution speed" method to solve it. How to solve this problem can be considered only by identifying the bottleneck that limits the speed.
The second small question is my approximate answer: code optimization, compression output, content cache output, function cache output, and acceleration/cache tool software. If you know more, please let me know.
Next, let's take a detailed look at the relevant technologies in these aspects. Of course, there are countless details in every aspect to discuss. The following content will inevitably be one-sided. Please add it.


Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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.