My Site ping 54ms, but the response is 1268ms, how can I speed up?

Source: Internet
Author: User

The server is Nginx, PHP is 5.4.38, compiled after installation is basically the default configuration, has installed the Opcache. What should be configured to speed up? Thank you

This is a simple test of firebug, waiting for the response time to reach 2.33s

Reply content:

The server is Nginx, PHP is 5.4.38, compiled after installation is basically the default configuration, has installed the Opcache. What should be configured to speed up? Thank you

This is a simple test of firebug, waiting for the response time to reach 2.33s

Logic code is supposed to consume time, especially data logic processing or database access ... Optimized code, n heavy loop is the focus, too much database access to adjust, some too complex SQL to simple SQL multiple access once may be faster, some SQL merged into a database once may also be faster ... There is no absolute way, it is reasonable to plan the logical processing and data access.

Take a step-by-step comment and try to see which code is going to get faster, and then focus on debugging the slow place

is the so-called "response time" refers to the browser input URL after white screen time? If this is the case, you can optimize the loading order of the page and script, as well as the proposed CDN acceleration, as far as possible first to let static resources loaded out

Take a look at the console to see what loads are most time consuming.
Then optimize for
http://www.zhihu.com/question/22776517

To optimize the program ~
Analyze the request with Xhprof
Find more time-consuming modules

  • 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.