Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


ASP program degrade on more load issue

Posted on 2002-07-11
Medium Priority
Last Modified: 2012-05-04
We are doing a new version of an ASP program.
The old one works fine when loaded with more than 300
hundred users.. However, we can't seem to find what
is the problem with the new version with similar load..
It slows down such that its unusable.

The old version just uses ASP and basic functions while
the new one uses ASP with VBScript classes.

When stress testing, the old version CPU goes up but
request wait time goes up and down.. while in the
new one, CPU goes up more - nearly max up and wait time
goes up and stays constant.

Any idea what we can check into?
Question by:ykf2000
LVL 20

Accepted Solution

jitganguly earned 268 total points
ID: 7146672
1. Database connections e.g. Make sure you close them
set rs=nothing
set conn=nothing

2. Close the instances of user defided DLL's and classes

3. Do not keep connections open. The best way is to open the connection, get the data, close the connection.

4. Try to filter records from backend e.g. use where cluase instead recordsert filters

5. Check your database table indexes

6. Close the instances of the classes when they are no longer needed.

7. For code table lookups, use joins to get the value. Do not go to backend to get his first name/last name from employee # etc.

8.If the session times out, force them to log back. Put this kind of code on top of each page
If seession("islogin")="" then
response.redirect "default.asp"
end if

These are certain guidelines. Unless we see the specific code, its hard to tell you
LVL 29

Assisted Solution

by:Göran Andersson
Göran Andersson earned 268 total points
ID: 7148829
First of all: moving to object oriented code is a step in the right direction. Object orientation is the best thing that happened to programming since Pascal.

Sadly enough, the support for OOP in VBscript (or VB either for that matter) is not very extensive. And object orientation in script languages means more overhead than in a compiled language. But still, it's a great step forward.

Because of the overhead, you have to be careful when implementing OOP in a script language. What normally goes for object orientation, is not always true when it's done in a script language.

For an example, properties are good, but unless you actually do something when setting or getting a property, a simple public variable is faster.

Don't use too many objects. For an example, instead of creating one object for each record in a recordset, just have one object where you can choose what record you want to read.

Do you have code for some small class of yours, that we could have a look at? It's hard to imagine everything that you may have come up with...

Assisted Solution

bfoust earned 264 total points
ID: 7148957
Here are some tips that i've used with success

+ use the ENABLESESSIONSTATE = False directive if your page does not require session management.

+ use the GetRows method of the recordset object to get your data into an array.  Close the DB connection immediately after.

+ Are you useing the Microsoft Web Site Stress Test tool?  If so, be sceptical of the results.  I've had times where the testing was dead on and other times where the testing absolutely KILLED the webserver but when set live, the site was fast as hell under the same load.

+ Its usually better to pass variables into your object through methods rather than using properties.  For example
myObject.MyProperty = "blue"

could be

myObject.RenderColor "blue" instead.  Thats just my opinion though, no hard facts really to support it.

** please provide code so we can better help you **
LVL 58

Expert Comment

ID: 8845372
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Split Points - bfoust / GreenGhost /  jitganguly
Please leave any comments here within the next seven days.
EE Cleanup Volunteer

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses
Course of the Month10 days, 19 hours left to enroll

572 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question