最近我遇到了一個項目,一直在屏幕上加載1000個以上的值時出現性能問題,起初我認爲它可能是數據庫花費太長的時間來拉取值。所以我在mysql上查詢了我的查詢,平均只需要大約0.5秒。ASP經典性能問題
於是我在做的是什麼問題,一些研究,我相信它當數據開始填充到UI ..
我有以下我的代碼部分,將它不得不做使用response.write而不是<%=%>這是造成這個問題,或者它可能是別的?
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Scans</title>
<link href="/css/jScrollPaneLg.css" type="text/css" rel="stylesheet" media="all" />
<%
if goodBrowser then
%>
<link href="/css/counts.css" type="text/css" rel="stylesheet" />
<%
else
%>
<link href="/css/nonie/counts.css" type="text/css" rel="stylesheet" />
<%
end if
%>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<script type="text/javascript" src="/scripts/jquery.mousewheel.js"></script>
<script type="text/javascript" src="/scripts/jScrollPane.js"></script>
<script type="text/javascript" src="/scripts/jquery.dataTables.js"></script>
<script type="text/javascript" charset="utf-8">
jQuery.fn.dataTableExt.oSort['num-html-asc'] = function(a,b) {
var x = a.replace(/<.*?>/g, "");
var y = b.replace(/<.*?>/g, "");
x = parseFloat(x);
y = parseFloat(y);
return ((x < y) ? -1 : ((x > y) ? 1 : 0));
};
jQuery.fn.dataTableExt.oSort['num-html-desc'] = function(a,b) {
var x = a.replace(/<.*?>/g, "");
var y = b.replace(/<.*?>/g, "");
x = parseFloat(x);
y = parseFloat(y);
return ((x < y) ? 1 : ((x > y) ? -1 : 0));
};
$(document).ready(function() {
$('#myTable').dataTable({
"bJQueryUI": true,
"bPaginate": false,
"sScrollY": "460px",
"aoColumns": [
null,
{ "sType": 'num-html' },
null,
null,
null,
null,
null,
null,
null,
null
]
});
});
</script>
<script type="text/javascript">
$(function()
{
// this initialises the demo scollpanes on the page.
//$('#pane').jScrollPane({showArrows:true, scrollbarWidth:17, scrollbarMargin:17});
});
</script>
<script src="/scripts/stop-copy.js" type="text/javascript" charset="utf-8"></script>
<style>
td.grn{
width:40px;
}
td.red13{
width:40px;
}
td.red{
width:40px;
}
td.grn13{
width:40px;
}
td.cell{
width:40px;
}
</style>
</head>
<body onmousedown="browser()" onkeydown="return checkCtrlIns(this)">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="scans-cell" valign="top">
<%
'response.Write tmpRows(0)
tmpHd1 = split(tmpRows(0),"=")
hdVals = split(tmpHd1(1),":")
howManyCols = Ubound(hdVals)+1
Redim dstrVals(howManyCols-2,41)
For k = 0 to howManyCols-3
dstrVals(k,41) = 0
Next
'244
tblWidth = 244+((howManyCols-2)*41) '10col 563px
%>
<table id="myTable" width="100%" height="100%" border="0" cellspacing="0" cellpadding="2" align="left" style="position:relative; bottom:-3px; left:0px;">
<thead>
<tr>
<%
For i = 0 to Ubound(hdVals)
if i = 0 then
response.Write "<td class=""symbollng"" valign=""bottom"" style=""border-right:0px; border-left:0px;"">" & hdVals(i) & "</td>" & vbnewline
elseif i = 1 then
response.Write "<td class=""close-hd"" valign=""bottom"">" & hdVals(i) & "</td>" & vbnewline
else
dstrVals(i-2,0) = hdVals(i)
response.Write "<td class=""col-hd-wd"" valign=""bottom"">" & hdVals(i) & "</td>" & vbnewline
end if
Next
%>
</tr>
</thead>
<tbody>
<%
EO = "odd"
For i = 1 to Ubound(tmpRows)-1
if EO = "odd" then
response.Write "<tr class=""grey"">" & vbnewline
else
response.Write "<tr>" & vbnewline
end if
tmpRowVals1 = split(tmpRows(i),"=")
tmpRowVals = split(tmpRowVals1(1),":")
For j = 0 to Ubound(tmpRowVals)
if j = 0 then
response.Write "<td class=""symbollng""><span title=""" & tmpRowVals(j) & """>" & tmpRowVals(j) & "</span></td>" & vbnewline
elseif j = 1 then
if trim(tmpRowVals(j)) = "" then
response.Write "<td class=""close""> </td>" & vbnewline
else
response.Write "<td class=""close""><span title=""" & tmpRowVals(j) & """>" & tmpRowVals(j) & "</span></td>" & vbnewline
end if
else
Call addToDistChart(j-2,tmpRowVals(j))
gTime = hdVals(j)
response.Write getCellColorWithClick(curlv(tmpRowVals(j)),tmpRowVals(0),gSec,gChar,gTime)
end if
Next
response.Write "</tr>" & vbnewline
if EO = "odd" then
EO = "even"
else
EO = "odd"
end if
Next
%>
</tbody>
</table>
</td>
<td class="div-cell"> </td>
<td class="dist-cell">
<div id="dist-header">
<h2 id="scanName">Indicator Distribution</h2>
</div>
<div id="dist-wrapper">
<div id="dist-content">
<div id="dist-sym">
<%
For i = 0 to howManyCols-3
if dstrVals(i,31) = "" AND dstrVals(i,32) = "" AND dstrVals(i,33) = "" AND dstrVals(i,34) = "" AND dstrVals(i,35) = "" AND dstrVals(i,36) = "" AND dstrVals(i,37) = "" AND dstrVals(i,38) = "" AND dstrVals(i,39) = "" AND dstrVals(i,40) = "" then
%>
<div id="dist-cell">
<table border="0" cellspacing="0" cellpadding="0" class="results" align="left">
<tr>
<td colspan="30" class="dist-ttl"><h3><%=study%> | <%=addMinHd(dstrVals(i,0))%></h3></td>
</tr>
<tr>
<td class="barrt" valign="bottom"><div class="grn-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,1)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,1)%>" align="right"></div></td>
<td class="barlt" valign="bottom"><div class="red-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,2)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,2)%>" align="left"></div></td>
<td class="barrt" valign="bottom"><div class="grn-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,3)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,3)%>" align="right"></div></td>
<td class="barlt" valign="bottom"><div class="red-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,4)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,4)%>" align="left"></div></td>
<td class="barrt" valign="bottom"><div class="grn-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,5)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,5)%>" align="right"></div></td>
<td class="barlt" valign="bottom"><div class="red-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,6)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,6)%>" align="left"></div></td>
<td class="barrt" valign="bottom"><div class="grn-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,7)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,7)%>" align="right"></div></td>
<td class="barlt" valign="bottom"><div class="red-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,8)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,8)%>" align="left"></div></td>
<td class="barrt" valign="bottom"><div class="grn-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,9)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,9)%>" align="right"></div></td>
<td class="barlt" valign="bottom"><div class="red-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,10)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,10)%>" align="left"></div></td>
<td class="barrt" valign="bottom"><div class="grn-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,11)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,11)%>" align="right"></div></td>
<td class="barlt" valign="bottom"><div class="red-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,12)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,12)%>" align="left"></div></td>
<td class="barrt" valign="bottom"><div class="grn-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,13)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,13)%>" align="right"></div></td>
<td class="barlt" valign="bottom"><div class="red-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,14)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,14)%>" align="left"></div></td>
<td class="barrt" valign="bottom"><div class="grn-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,15)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,15)%>" align="right"></div></td>
<td class="barlt" valign="bottom"><div class="red-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,16)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,16)%>" align="left"></div></td>
<td class="barrt" valign="bottom"><div class="grn-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,17)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,17)%>" align="right"></div></td>
<td class="barlt" valign="bottom"><div class="red-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,18)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,18)%>" align="left"></div></td>
<td class="barrt" valign="bottom"><div class="grn-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,19)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,19)%>" align="right"></div></td>
<td class="barlt" valign="bottom"><div class="red-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,20)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,20)%>" align="left"></div></td>
<td class="barrt" valign="bottom"><div class="grn-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,21)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,21)%>" align="right"></div></td>
<td class="barlt" valign="bottom"><div class="red-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,22)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,22)%>" align="left"></div></td>
<td class="barrt" valign="bottom"><div class="grn-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,23)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,23)%>" align="right"></div></td>
<td class="barlt" valign="bottom"><div class="red-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,24)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,24)%>" align="left"></div></td>
<td class="barrt" valign="bottom"><div class="grn-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,25)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,25)%>" align="right"></div></td>
<td class="barlt" valign="bottom"><div class="red-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,26)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,26)%>" align="left"></div></td>
<td class="barrt" valign="bottom"><div class="grn-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,27)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,27)%>" align="right"></div></td>
<td class="barlt" valign="bottom"><div class="red-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,28)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,28)%>" align="left"></div></td>
<td class="barrt" valign="bottom"><div class="grn-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,29)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,29)%>" align="right"></div></td>
<td class="barlt" valign="bottom"><div class="red-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,30)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,30)%>" align="left"></div></td>
</tr>
<tr>
<td colspan="2" class="res">1</td>
<td colspan="2" class="res">2</td>
<td colspan="2" class="res">3</td>
<td colspan="2" class="res">4</td>
<td colspan="2" class="res">5</td>
<td colspan="2" class="res">6</td>
<td colspan="2" class="res">7</td>
<td colspan="2" class="res">8</td>
<td colspan="2" class="res">9</td>
<td colspan="2" class="res">10</td>
<td colspan="2" class="res">11</td>
<td colspan="2" class="res">12</td>
<td colspan="2" class="res">12+</td>
<td colspan="2" class="res">13</td>
<td colspan="2" class="res">>13</td>
</tr>
</table>
</div>
<%
else
%>
<div id="dist-cell">
<table border="0" cellspacing="0" cellpadding="0" class="results" align="left">
<tr>
<td colspan="24" class="dist-ttl"><h3><%=study%> | <%=addMinHd(dstrVals(i,0))%></h3></td>
</tr>
<tr>
<td class="barrt" valign="bottom"><div class="grn-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,1)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,1)%>" align="right"></div></td>
<td class="barlt" valign="bottom"><div class="red-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,2)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,2)%>" align="left"></div></td>
<td class="barrt" valign="bottom"><div class="grn-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,3)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,3)%>" align="right"></div></td>
<td class="barlt" valign="bottom"><div class="red-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,4)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,4)%>" align="left"></div></td>
<td class="barrt" valign="bottom"><div class="grn-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,5)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,5)%>" align="right"></div></td>
<td class="barlt" valign="bottom"><div class="red-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,6)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,6)%>" align="left"></div></td>
<td class="barrt" valign="bottom"><div class="grn-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,7)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,7)%>" align="right"></div></td>
<td class="barlt" valign="bottom"><div class="red-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,8)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,8)%>" align="left"></div></td>
<td class="barrt" valign="bottom"><div class="grn-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,9)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,9)%>" align="right"></div></td>
<td class="barlt" valign="bottom"><div class="red-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,10)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,10)%>" align="left"></div></td>
<td class="barrt" valign="bottom"><div class="grn-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,11)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,11)%>" align="right"></div></td>
<td class="barlt" valign="bottom"><div class="red-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,12)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,12)%>" align="left"></div></td>
<td class="barrt" valign="bottom"><div class="grn-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,13)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,13)%>" align="right"></div></td>
<td class="barlt" valign="bottom"><div class="red-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,14)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,14)%>" align="left"></div></td>
<td class="barrt" valign="bottom"><div class="grn-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,31)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,31)%>" align="right"></div></td>
<td class="barlt" valign="bottom"><div class="red-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,32)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,32)%>" align="left"></div></td>
<td class="barrt" valign="bottom"><div class="grn-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,33)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,33)%>" align="right"></div></td>
<td class="barlt" valign="bottom"><div class="red-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,34)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,34)%>" align="left"></div></td>
<td class="barrt" valign="bottom"><div class="grn-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,35)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,35)%>" align="right"></div></td>
<td class="barlt" valign="bottom"><div class="red-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,36)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,36)%>" align="left"></div></td>
<td class="barrt" valign="bottom"><div class="grn-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,37)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,37)%>" align="right"></div></td>
<td class="barlt" valign="bottom"><div class="red-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,38)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,38)%>" align="left"></div></td>
<td class="barrt" valign="bottom"><div class="grn-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,39)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,39)%>" align="right"></div></td>
<td class="barlt" valign="bottom"><div class="red-bar" style="height:<%=getPercInt(getCleanInt(dstrVals(i,40)),dstrVals(i,41))%>%;" title="<%=dstrVals(i,40)%>" align="left"></div></td>
</tr>
<tr>
<td colspan="2" class="res">1</td>
<td colspan="2" class="res">2</td>
<td colspan="2" class="res">3</td>
<td colspan="2" class="res">4</td>
<td colspan="2" class="res">5</td>
<td colspan="2" class="res">6</td>
<td colspan="2" class="res">7</td>
<td colspan="2" class="res">IM 8</td>
<td colspan="2" class="res">P 8</td>
<td colspan="2" class="res">IM 9</td>
<td colspan="2" class="res">P* 9</td>
<td colspan="2" class="res">P 9</td>
</tr>
</table>
</div>
<%
end if
Next
%>
</div>
</div>
</div>
</td>
</tr>
</table>
</body>
</html>
<!--#include virtual="/inc/inc_functions.asp"-->
<%
Function addMinHd(strVar)
if isnumeric(strVar) then
addMinHd = strVar & " Min"
else
addMinHd = strVar
end if
End Function
Sub addToDistChart(col,val)
Select Case lcase(curlv(val))
Case "1"
if NOT Isnumeric(dstrVals(col,1)) then
dstrVals(col,1) = 0
end if
dstrVals(col,1) = dstrVals(col,1) + 1
tmpVal = dstrVals(col,1)
if tmpVal > dstrVals(col,41) then
dstrVals(col,41) = tmpVal
end if
Case "-1"
if NOT Isnumeric(dstrVals(col,2)) then
dstrVals(col,2) = 0
end if
dstrVals(col,2) = dstrVals(col,2) + 1
tmpVal = dstrVals(col,2)
if tmpVal > dstrVals(col,41) then
dstrVals(col,41) = tmpVal
end if
Case "2"
if NOT Isnumeric(dstrVals(col,3)) then
dstrVals(col,3) = 0
end if
dstrVals(col,3) = dstrVals(col,3) + 1
tmpVal = dstrVals(col,3)
if tmpVal > dstrVals(col,41) then
dstrVals(col,41) = tmpVal
end if
Case "-2"
if NOT Isnumeric(dstrVals(col,4)) then
dstrVals(col,4) = 0
end if
dstrVals(col,4) = dstrVals(col,4) + 1
tmpVal = dstrVals(col,4)
if tmpVal > dstrVals(col,41) then
dstrVals(col,41) = tmpVal
end if
Case "3"
if NOT Isnumeric(dstrVals(col,5)) then
dstrVals(col,5) = 0
end if
dstrVals(col,5) = dstrVals(col,5) + 1
tmpVal = dstrVals(col,5)
if tmpVal > dstrVals(col,41) then
dstrVals(col,41) = tmpVal
end if
Case "-3"
if NOT Isnumeric(dstrVals(col,6)) then
dstrVals(col,6) = 0
end if
dstrVals(col,6) = dstrVals(col,6) + 1
tmpVal = dstrVals(col,6)
if tmpVal > dstrVals(col,41) then
dstrVals(col,41) = tmpVal
end if
Case "4"
if NOT Isnumeric(dstrVals(col,7)) then
dstrVals(col,7) = 0
end if
dstrVals(col,7) = dstrVals(col,7) + 1
tmpVal = dstrVals(col,7)
if tmpVal > dstrVals(col,41) then
dstrVals(col,41) = tmpVal
end if
Case "-4"
if NOT Isnumeric(dstrVals(col,8)) then
dstrVals(col,8) = 0
end if
dstrVals(col,8) = dstrVals(col,8) + 1
tmpVal = dstrVals(col,8)
if tmpVal > dstrVals(col,41) then
dstrVals(col,41) = tmpVal
end if
Case "5"
if NOT Isnumeric(dstrVals(col,9)) then
dstrVals(col,9) = 0
end if
dstrVals(col,9) = dstrVals(col,9) + 1
tmpVal = dstrVals(col,9)
if tmpVal > dstrVals(col,41) then
dstrVals(col,41) = tmpVal
end if
Case "-5"
if NOT Isnumeric(dstrVals(col,10)) then
dstrVals(col,10) = 0
end if
dstrVals(col,10) = dstrVals(col,10) + 1
tmpVal = dstrVals(col,10)
if tmpVal > dstrVals(col,41) then
dstrVals(col,41) = tmpVal
end if
Case "6"
if NOT Isnumeric(dstrVals(col,11)) then
dstrVals(col,11) = 0
end if
dstrVals(col,11) = dstrVals(col,11) + 1
tmpVal = dstrVals(col,11)
if tmpVal > dstrVals(col,41) then
dstrVals(col,41) = tmpVal
end if
Case "-6"
if NOT Isnumeric(dstrVals(col,12)) then
dstrVals(col,12) = 0
end if
dstrVals(col,12) = dstrVals(col,12) + 1
tmpVal = dstrVals(col,12)
if tmpVal > dstrVals(col,41) then
dstrVals(col,41) = tmpVal
end if
Case "7"
if NOT Isnumeric(dstrVals(col,13)) then
dstrVals(col,13) = 0
end if
dstrVals(col,13) = dstrVals(col,13) + 1
tmpVal = dstrVals(col,13)
if tmpVal > dstrVals(col,41) then
dstrVals(col,41) = tmpVal
end if
Case "-7"
if NOT Isnumeric(dstrVals(col,14)) then
dstrVals(col,14) = 0
end if
dstrVals(col,14) = dstrVals(col,14) + 1
tmpVal = dstrVals(col,14)
if tmpVal > dstrVals(col,41) then
dstrVals(col,41) = tmpVal
end if
Case "8"
if NOT Isnumeric(dstrVals(col,15)) then
dstrVals(col,15) = 0
end if
dstrVals(col,15) = dstrVals(col,15) + 1
tmpVal = dstrVals(col,15)
if tmpVal > dstrVals(col,41) then
dstrVals(col,41) = tmpVal
end if
Case "-8"
if NOT Isnumeric(dstrVals(col,16)) then
dstrVals(col,16) = 0
end if
dstrVals(col,16) = dstrVals(col,16) + 1
tmpVal = dstrVals(col,16)
if tmpVal > dstrVals(col,41) then
dstrVals(col,41) = tmpVal
end if
Case "9"
if NOT Isnumeric(dstrVals(col,17)) then
dstrVals(col,17) = 0
end if
dstrVals(col,17) = dstrVals(col,17) + 1
tmpVal = dstrVals(col,17)
if tmpVal > dstrVals(col,41) then
dstrVals(col,41) = tmpVal
end if
Case "-9"
if NOT Isnumeric(dstrVals(col,18)) then
dstrVals(col,18) = 0
end if
dstrVals(col,18) = dstrVals(col,18) + 1
tmpVal = dstrVals(col,18)
if tmpVal > dstrVals(col,41) then
dstrVals(col,41) = tmpVal
end if
Case "10"
if NOT Isnumeric(dstrVals(col,19)) then
dstrVals(col,19) = 0
end if
dstrVals(col,19) = dstrVals(col,19) + 1
tmpVal = dstrVals(col,19)
if tmpVal > dstrVals(col,41) then
dstrVals(col,41) = tmpVal
end if
Case "-10"
if NOT Isnumeric(dstrVals(col,20)) then
dstrVals(col,20) = 0
end if
dstrVals(col,20) = dstrVals(col,20) + 1
tmpVal = dstrVals(col,20)
if tmpVal > dstrVals(col,41) then
dstrVals(col,41) = tmpVal
end if
Case "11"
if NOT Isnumeric(dstrVals(col,21)) then
dstrVals(col,21) = 0
end if
dstrVals(col,21) = dstrVals(col,21) + 1
tmpVal = dstrVals(col,21)
if tmpVal > dstrVals(col,41) then
dstrVals(col,41) = tmpVal
end if
Case "-11"
if NOT Isnumeric(dstrVals(col,22)) then
dstrVals(col,22) = 0
end if
dstrVals(col,22) = dstrVals(col,22) + 1
tmpVal = dstrVals(col,22)
if tmpVal > dstrVals(col,41) then
dstrVals(col,41) = tmpVal
end if
Case "12"
if NOT Isnumeric(dstrVals(col,23)) then
dstrVals(col,23) = 0
end if
dstrVals(col,23) = dstrVals(col,23) + 1
tmpVal = dstrVals(col,23)
if tmpVal > dstrVals(col,41) then
dstrVals(col,41) = tmpVal
end if
Case "-12"
if NOT Isnumeric(dstrVals(col,24)) then
dstrVals(col,24) = 0
end if
dstrVals(col,24) = dstrVals(col,24) + 1
tmpVal = dstrVals(col,24)
if tmpVal > dstrVals(col,41) then
dstrVals(col,41) = tmpVal
end if
Case "12+"
if NOT Isnumeric(dstrVals(col,25)) then
dstrVals(col,25) = 0
end if
dstrVals(col,25) = dstrVals(col,25) + 1
tmpVal = dstrVals(col,25)
if tmpVal > dstrVals(col,41) then
dstrVals(col,41) = tmpVal
end if
Case "-12+"
if NOT Isnumeric(dstrVals(col,26)) then
dstrVals(col,26) = 0
end if
dstrVals(col,26) = dstrVals(col,26) + 1
tmpVal = dstrVals(col,26)
if tmpVal > dstrVals(col,41) then
dstrVals(col,41) = tmpVal
end if
Case "13"
if NOT Isnumeric(dstrVals(col,27)) then
dstrVals(col,27) = 0
end if
dstrVals(col,27) = dstrVals(col,27) + 1
tmpVal = dstrVals(col,27)
if tmpVal > dstrVals(col,41) then
dstrVals(col,41) = tmpVal
end if
Case "-13"
if NOT Isnumeric(dstrVals(col,28)) then
dstrVals(col,28) = 0
end if
dstrVals(col,28) = dstrVals(col,28) + 1
tmpVal = dstrVals(col,28)
if tmpVal > dstrVals(col,41) then
dstrVals(col,41) = tmpVal
end if
Case ">13"
if NOT Isnumeric(dstrVals(col,29)) then
dstrVals(col,29) = 0
end if
dstrVals(col,29) = dstrVals(col,29) + 1
tmpVal = dstrVals(col,29)
if tmpVal > dstrVals(col,41) then
dstrVals(col,41) = tmpVal
end if
Case "->13"
if NOT Isnumeric(dstrVals(col,30)) then
dstrVals(col,30) = 0
end if
dstrVals(col,30) = dstrVals(col,30) + 1
tmpVal = dstrVals(col,30)
if tmpVal > dstrVals(col,41) then
dstrVals(col,41) = tmpVal
end if
Case "im 8"
if NOT Isnumeric(dstrVals(col,31)) then
dstrVals(col,31) = 0
end if
dstrVals(col,31) = dstrVals(col,31) + 1
tmpVal = dstrVals(col,31)
if tmpVal > dstrVals(col,41) then
dstrVals(col,41) = tmpVal
end if
Case "-im 8"
if NOT Isnumeric(dstrVals(col,32)) then
dstrVals(col,32) = 0
end if
dstrVals(col,32) = dstrVals(col,32) + 1
tmpVal = dstrVals(col,32)
if tmpVal > dstrVals(col,41) then
dstrVals(col,41) = tmpVal
end if
Case "p 8"
if NOT Isnumeric(dstrVals(col,33)) then
dstrVals(col,33) = 0
end if
dstrVals(col,33) = dstrVals(col,33) + 1
tmpVal = dstrVals(col,33)
if tmpVal > dstrVals(col,41) then
dstrVals(col,41) = tmpVal
end if
Case "-p 8"
if NOT Isnumeric(dstrVals(col,34)) then
dstrVals(col,34) = 0
end if
dstrVals(col,34) = dstrVals(col,34) + 1
tmpVal = dstrVals(col,34)
if tmpVal > dstrVals(col,41) then
dstrVals(col,41) = tmpVal
end if
Case "im 9"
if NOT Isnumeric(dstrVals(col,35)) then
dstrVals(col,35) = 0
end if
dstrVals(col,35) = dstrVals(col,35) + 1
tmpVal = dstrVals(col,35)
if tmpVal > dstrVals(col,41) then
dstrVals(col,41) = tmpVal
end if
Case "-im 9"
if NOT Isnumeric(dstrVals(col,36)) then
dstrVals(col,36) = 0
end if
dstrVals(col,36) = dstrVals(col,36) + 1
tmpVal = dstrVals(col,36)
if tmpVal > dstrVals(col,41) then
dstrVals(col,41) = tmpVal
end if
Case "p* 9"
if NOT Isnumeric(dstrVals(col,37)) then
dstrVals(col,37) = 0
end if
dstrVals(col,37) = dstrVals(col,37) + 1
tmpVal = dstrVals(col,37)
if tmpVal > dstrVals(col,41) then
dstrVals(col,41) = tmpVal
end if
Case "-p* 9"
if NOT Isnumeric(dstrVals(col,38)) then
dstrVals(col,38) = 0
end if
dstrVals(col,38) = dstrVals(col,38) + 1
tmpVal = dstrVals(col,38)
if tmpVal > dstrVals(col,41) then
dstrVals(col,41) = tmpVal
end if
Case "p 9"
if NOT Isnumeric(dstrVals(col,39)) then
dstrVals(col,39) = 0
end if
dstrVals(col,39) = dstrVals(col,39) + 1
tmpVal = dstrVals(col,39)
if tmpVal > dstrVals(col,41) then
dstrVals(col,41) = tmpVal
end if
Case "-p 9"
if NOT Isnumeric(dstrVals(col,40)) then
dstrVals(col,40) = 0
end if
dstrVals(col,40) = dstrVals(col,40) + 1
tmpVal = dstrVals(col,40)
if tmpVal > dstrVals(col,41) then
dstrVals(col,41) = tmpVal
end if
Case else
'was blank cell
End Select
End Sub
%>
這也許可以幫助你http://www.webdevelopersjournal.com/articles/asp_performance.html另外:http://msdn.microsoft.com/en-us/library/ms972335.aspx – Dee