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...
Main Topics
Browse All Topics





by: jitgangulyPosted on 2002-07-11 at 09:20:06ID: 7146672
Check
1. Database connections e.g. Make sure you close them
rs.close
set rs=nothing
conn.close
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