Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

610 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