The first chapter is optimized for system calls too muchMy optimization for syscall calls too many problems, so use Strace to trace Apache for analysis.
1. Apache2ctl-x &Start the httpd process with the-X (debug) parameter, which starts only 1
Use single quotes instead of double quotes to include strings, which is faster. Because PHP will search for variables in strings enclosed by double quotes, but not in single quotes. Note: Only echo can do this, it is a "function" that can treat
1. Do not copy variables randomlySometimes in order to make the PHP code more neat, some novice PHP (including me) will copy the predefined variables into a shorter name of the variable, in fact, the result is an increase in memory consumption, will
1. First we install the XHPROF:Yum Install Xhprof2. After installation, find xhprof configuration file xhprof.conf, usually in/ETC/PHP.D, add these 2 lines:Extension=xhprof.soxhprof.output_dir= This path refers to the folder where the generated data
DescriptionPHP 5.5+ version above, you can use PHP's own opcache to turn on performance acceleration (the default is off). For PHP versions below 5.5, APC acceleration is required, which does not indicate that the PHP APC acceleration method can be
Hprof is an open source PHP lightweight performance analysis tool for Facebook, similar to Xdebug, but with lower performance overhead, can also be used in production environments or controlled by program switches. Based on BrowseThe Performance
Hprof is an open source PHP lightweight performance analysis tool for Facebook, similar to Xdebug, but with lower performance overhead, can also be used in production environments or controlled by program switches. Based on BrowseThe Performance
Today, I stumbled across Www.xhprof.com's ability to analyze PHP code remotely, with the following general steps1. Enter www.xhprof.com, click on the upper right corner to register and login, the left side of the site explains how to install the
This article provides a detailed analysis of PHP performance optimization. For more information, see PHP optimization. the main parameters in ini are adjusted and set properly. let's take a look at php below. how to set parameters that have a
PHP is a script language executed on the server. it has developed many well-known websites in the world, including Yahoo and Facebook. The following describes six PHP code and performance optimization techniques.
1. upgrade PHP to the latest version.
This is the first phase of the PHP performance optimization series. how to install PEAR in a Windows environment and use the Benchmark tool class as an example to explain how to install the extension class for PEAR.
What is PEAR?
PEAR is the
Provides various official and user-released code examples and code reference. You are welcome to learn about PHP performance optimization.
If the class method can be defined as static, it should be defined as static as much as possible, and its
Php performance efficiency optimization 1. if you can use file_get_contents instead of file, fopen, feof, fget, and other methods, try to use feil_get_contents because it is much more efficient! Note the php version of file_get_contents when opening
Load bottlenecks are generally mainly in the following four areas:
1 database
2 Server CPU
3 hard disk I/O
4 Network bandwidth
Except for the four of them. What else is worth optimizing for? PHP is really strong. Today, the PHP script level to
Ant Financial learns PHP performance optimization (2) PHP language-level performance optimization (part 1)
3. Optimization: use as few magic functions as possible
Situation description: Magic functions provided by PHP have poor performance.
Why?
PHP performance optimization (finishing ). PHP optimization for PHP is mainly for php. the main parameters in ini are adjusted and set properly. let's take a look at php below. some parameters in ini that have a major impact on performance should be
Original link: http://blog.snsgou.com/post-816.html1. Download XhprofHere http://dev.freshsite.pl/php-extensions/xhprof.html download the Windows version of Xhprof, I choose here to downloadXhprof 0.10.3 for PHP 5.3 vc9 and xhprof_html2,
Php performance optimization: using isset () to determine the string length is faster than strlen. How can I determine the length of a string in php? Many people think of strlen () mb_strlen () functions first. However, in terms of program
PHP performance optimization (1)-Five Tips. 1. do not copy variables at will. sometimes, to make PHP code more clean, some new PHP users (including me) will copy the predefined variables to a variable with a shorter name. In fact
1. do not copy
Php performance optimization (2)-php code writing habits optimization. The following summarizes the optimization habits that can be done in 18 php code writing to maximize the speed of php code execution! (1) the static method is four times faster
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.