Performance problems

Results 1 to 2 of 2

Thread: Performance problems

  1. #1
    Join Date
    Dec 1969

    Default Performance problems

    i need some suggestions as to why my site&#039;s response is slowing down. I&#039;ve been doing a load test on my site...<BR>I created a vbscript that loops through a file of over 70,000 records, builds a querystring using the record informatino and then using the xmlhttp object, it sends an http request including the query string to a registration web page on the same box. <BR>for the first few hundred requests, the reponse time is very fast. but then it starts to slow down a little bit at a time. I&#039;ve checked for memory leaks in the registration method / function in the COM object. I&#039;ve tried tweaking the vbs script <BR>by removing the logging, removing any console output, ensuring that I destroy all objects etc. I&#039;ve done the same with the reg. web page but nothing has worked. <BR>Is there any other area I should be looking in to? Is there another control i can use instead of the xmlhttp object?<BR><BR>here&#039;s what the test driver (script) looks like:<BR><BR>Option Explicit<BR><BR>&#039; Global Declares<BR>Dim objXMLHTTP, Script<BR>Dim objEnmax, fso, f, ts, strInput, custID, premiseID<BR><BR>Dim fname, mname, lname, regname, address<BR>Const ForReading = 1, ForWriting = 2, ForAppending = 8<BR>Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0<BR><BR>Set objEnmax = CreateObject("TEMP.Customer")<BR>Set fso = CreateObject("Scripting.FileSystemObject")<BR>Set objXMLHTTP = CreateObject("MSXML2.XMLHTTP")<BR><BR>&#039; Standard include<BR>Set Script = CreateObject("UTIL.Script")<BR>Execute Script.Include("stdinc2.vbs")<BR><BR>&#039; Begin Script<BR>WriteToLog "Starting Registration Script..."<BR>Set f = fso.GetFile("records.dat")<BR>Set ts = f.OpenAsTextStream(ForReading, TristateUseDefault)<BR>Do While Not ts.AtEndofStream<BR> strInput = ts.ReadLine<BR> &#039;Cust & PremID<BR> custID = mid(strinput,4,6)<BR> premiseID = mid(strinput,10,6)<BR> WriteToLog "Registering " & custid & "-" & premiseid & "..."<BR> <BR> &#039;Name<BR> fname=Trim(Mid(strinput, 31, 15))<BR> mname=Trim(Mid(strinput, 46, 15))<BR> lname=Trim(Mid(strinput, 61, 60))<BR> regname = lname&fname&mname<BR><BR> &#039;Address<BR> address = Trim(Mid(strinput, 179, 6))<BR><BR> "GET", "" & custID & "&premiseID=" & premiseID & "&CustomerName=" & regname & "&" & "&AddressLine1=" & address, false<BR> StartTimer<BR> objXMLHTTP.send<BR> Do Until objXMLHTTP.ReadyState=4<BR> Loop<BR> WriteToLog objXMLHTTP.statusText & " - " & GetTimer<BR>loop <BR>ts.close<BR>wscript.echo "done"<BR><BR><BR>The web page itself looks like this:<BR><BR>Dim oCustomer, strAccountNumber, AcctsSelectedToReg, bretval<BR>Set oCustomer = CreateObject("TEMP.Customer")<BR><BR>strAccountNum ber = "000" & Request.Querystring("CustID") & "0" & Request.Querystring("PremiseID")<BR>oCustomer.Cust omerName= Request.Querystring("CustomerName")<BR>oCustomer.S erviceAddress=Request.Querystring("AddressLine1")< BR>oCustomer.EmailAddress=Request.Querystring("ema ilAddress")<BR>bretval = oCustomer.RegisterAccounts<BR>Set oCustomer = Nothing<BR>Set AcctsSelectedToReg = Nothing<BR>

  2. #2
    Join Date
    Dec 1969

    Default Two things

    &nbsp;<BR> For starters, it is probably the size of the log file<BR> and subsequent appends to it that are the real culprit.<BR> Try running your test and only writing to the log file<BR> every 100 or 1000 records.<BR><BR> I also had to write a VB desktop app to perform a<BR> high number of XMLHttp transfers. I noticed XMLHttp<BR> giving me "strange" behavior after a few thousand sends.<BR> When I created, used, and destroyed the XMLHttp object<BR> with each send, the problems stopped.<BR><BR> BTW, there is no need for the following loop:<BR><BR> Do Until objXMLHTTP.ReadyState=4<BR> Loop<BR><BR> The .Send method will halt at this line until the<BR> send is done or an error has occurred.<BR><BR> if objXMLHttp.ReadyState = 4 then<BR> msgbox "successful"<BR> end if<BR><BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts