Home > Web Front-end > HTML Tutorial > How to detect the reason why an aspx page is slow_html/css_WEB-ITnose

How to detect the reason why an aspx page is slow_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:47:18
Original
1422 people have browsed it

I recently read an article about how to improve the speed of an aspx page. This is a common interview question. The original text of this question comes from this website.


There are various reasons for this problem. We need to investigate step by step to locate where the problem really occurs.



1. Find out which part is slow, whether it is the website itself or the database interaction process. If this page interacts with the database, extract these SQL instructions and run them on the database console. If executing these statements on the database console is still very slow, it means that the problem occurs in the interaction with the database. At this time, you need to consider optimizing these SQL statements.
a. Check whether there is an index to improve query speed
b. Using select * will reduce efficiency
c. Use the join keyword as little as possible

2. If The SQL statement executes very quickly, so the problem is likely to be with the website itself. At this time, we need to view each Page event one by one to determine which one is executing slowly. There is a tracing tool in ASP.NET. We can use this to see how long each event takes. Set Trace="true" in the page directive, and then you can see the time parameter list of each event at the bottom of the page.



source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template