I also encountered this situation: 2W records in the database. Use the usual method of mixing the usual HTML and ASP to display. When you open the page, you have to wait a long time to see the effect. Then click Next It takes a long time when the page. I asked some masters to know that the problem was mixed with HTML and ASP. This method of use has a small amount of data and does not have much impact. If the amount of data is large, it will waste time.
Response.write and <%=%> are the methods of output string to the client to the client. Although the results of the two are the same, their effects are different.
Generally speaking, most of the time we use <%=%> in the state of mixing HTML and ASP code, and Response.write is used in the <%...%> script segment, but from VBScript syntax <%= Expression %> Write the value of "expression" into the ASP output stream to analyze this method. If the response buffer is not opened, each sentence of these statements will cause data to write data to the browser through the form of many small bags. This is very slow. In addition, explaining a small amount of scripts and HTML will cause switching between the script engine and HTML, which also reduces performance. Therefore, for a call for response.write, replacement of the embedded dense combination expression can be greatly improved in terms of the performance of the application.
We usually use the following sentences to display the database content:
<%Dowhilenotrs.eof%>
<%= RS ("Flides")%>
<%rs.movenext%>
<%loop%>
Not as good as
<%STR = "" "
Fori = 1Tors.Rcodecount
Str = Str+RS ("Flides")
rs.movenext
next
Response.write (STR)
%>
The execution speed is fast. Also, we use
Fori = 1Tors.Rcodecount
Replace
Dowhilenotrs.eof
There is also an obvious benefit. With the specified number of times, you can avoid the end of the cycle at each time.
This can also improve efficiency.