Refreshing php websites seems a little slow

Source: Internet
Author: User
It seems a little slow to refresh and browse php websites. What are the factors that affect the load time of Website?

Mysql database

Considerations: Design of database query statements? Have you set the cache? Php statement usage?


Reply to discussion (solution)

1. network problems
2. data IO

Generally, I/O processing is the slowest. add some timestamps to your program to check the execution time of each command.

In addition to the compilation cache and data cache mechanisms, the impact on the database is relatively large without considering some objective factors such as hardware.

It is best to analyze the SQL desc you executed, which may also be caused by the network,

In addition to some objective factors such as hardware, the impact of the database on compilation cache and data cache is relatively large, and the effect of adding a Cache mechanism is obvious, when the website browses a large amount of data, some cache is created. Otherwise, the pressure on the server will increase each access.

1. network problems
2. data IO

Generally, I/O processing is the slowest. add some timestamps to your program to check the execution time of each command.
Other factors will accelerate the speed of opening and loading some websites if you are considerate?

The company website introduces a Sina Weibo interface, and then checks the website load in the background. This Sina Weibo interface needs to be loaded for a period of time.


1. network problems
2. data IO

Generally, I/O processing is the slowest. add some timestamps to your program to check the execution time of each command.
Other factors will accelerate the speed of opening and loading some websites if you are considerate?

The company website introduces a Sina Weibo interface, and then checks the website load in the background. This Sina Weibo interface needs to be loaded for a period of time.

So load it asynchronously. Weibo information displayed on many websites is asynchronous.

Or you can cache this.



1. network problems
2. data IO

Generally, I/O processing is the slowest. add some timestamps to your program to check the execution time of each command.
Other factors will accelerate the speed of opening and loading some websites if you are considerate?

The company website introduces a Sina Weibo interface, and then checks the website load in the background. This Sina Weibo interface needs to be loaded for a period of time.

So load it asynchronously. Weibo information displayed on many websites is asynchronous.

Or you can cache this.
Okay. let me try it. thank you very much.

There are too many birds ~~~~~

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.