How can I troubleshoot a longer web site or interface response time?

Source: Internet
Author: User

If your website is open for a long time, for what reason, first from the outermost layer to troubleshoot.
Browser Press F12, see the network which file time is the longest, this is to check the possible CSS or JS plug-in reference to some of the domestic wall address, has not been requested, so the time is long. Locate the relevant local comment, or refer to the local.

If the file reference anything is OK, look at the interface bar.

First write a script to visit the intranet to access the interface, to see if the time is very long, if it is long, chase into the interface, one-by-one analysis, find SQL to do a bit of MySQL, to see if the time is long, if long, we have to optimize the SQL problem, expain SQL to see what the index situation, targeted optimization. The scale of the data is too large to be divided into tables, can be divided into libraries. If SQL is not a problem, it could be a matter of writing logic code, a line of code, find time-consuming local transformation, optimization logic.

If the reference file, and interface access are no problem, it could be a network problem.

For example, you use a telecommunications room, users in the Unicom visit, very slow. You change the other education network, Unicom Network what environment to try to see if it is slow, if slow, then you have to adopt a CDN accelerator strategy, or think of other ways.

What to do if the response time is too long to cause web page problems
1, the machine configuration. Including server-side and client-side hardware configuration level, the same network environment, dual-core server computing power certainly better, no doubt, the same network environment, with a Celeron machine and Ben four duo processor computer, open the same Web page, speed, and certainly not the same.

2, Server Software. The number of software, stability and the correct configuration of software will affect the server environment, which affects the network speed. Server installation software firewall, will sacrifice some network speed, so VPS, or standalone server users to install a firewall is sufficient.

3, DNS resolution time. DNS resolution includes the number of round-trip resolution and the time spent on each resolution, the product of which is the time consumed by DNS resolution, so many people ignore the problem of DNS.

4, the network minimum bandwidth. This is the most important factor, in the slow site in the good bandwidth to access the same fast (that is, more money), the network bandwidth includes the site's server bandwidth and the user two locations, the point of contact refers to the export end and the entry end (such as the telecom to Netcom docking points), the other is the user's own minimum bandwidth, If the user is 512K broadband I can not help.

5, the size of the content of the Web page (important). The size of the Web file is the site is
Whether you can quickly open the most important factor, if the server and other hardware aspects can not be decided, it is strongly recommended to start from here, whether it is a table or DIV+CSS, the appropriate optimization code, can reduce the size of the page. Try to optimize the code with minimal code. At the same time, a lot of error, redundant code is also slow down one of the site speed.

6, a large number of database operations. Small site in the implementation of a large number of database operations, it will also affect the speed of the Web site, where the asp+access structure of the site is particularly obvious, especially at the same time there are a large number of users to submit comments, the operation of the database lock, resulting in the site can not open.

7, with a lot of JavaScript. The use of a large number of JS on the site is taboo, not only search engines can not be included, and will continue to submit requests to increase the burden of the server, such as mouse effects, columns of special effects, status bar effects and so on. The principle of these special effects is to first download the server to the local machine, and then run on the local machine generated, and then to see.

8, the page with large pictures and flash. The picture is slow speed the most important factor, the picture after processing, can make the picture space smaller, otherwise many pictures start to occupy a lot of space and make the website open speed becomes very slow, same flash is also a reason.

9, too many references to the content of other sites. including pictures, video files, etc. that refer to other websites, if you refer to other sites directly on the page, and that site is slow, or the page of that site already does not exist, then the speed of opening will be very slow.

How can I troubleshoot a longer web site or interface response time?

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.