|
I have a performance and optimization question on Windows 2003 server using ASP.
I have a large number of global variables used in everything from the meta tags to global includes. Up till now I have been using constants written on a static page and brought in during each page page request.
I have a few ways I can do this but the way I am leaning is application variables.
1st way is the way I am doing it. The main page requests the static include and uses the const variables.
2nd way is a method I have used with an application scope record set that if not present, would populate from the SQL table. (I may have to explain that more fully)
3rd way is the way I'm heading... the configuration data is store in a SQL table, if the application variables are not available, it queries the table and assigns the variables.
Here's the tricky part that I'm having trouble with...
On each page request, in a global include, the application variables are used as source for dimensional variables instead of calling the application vars directly. This is due to existing coding.
- Method 1 (using a static include) {current method}
- const strGlobal = "custom setting for site"
- Method 2 (Using an application scope record set)
- DIM StrGlobal
- StrGlobal = rs(1)
- Method 3
- Dim strGlobal
- strGlobal = Application("strGlobal")
Bottom line, or performance, which would be better, 1, 2, or 3?
If you say # 1 then I spent the weekend wasting my time. (DOH) But not really because I could still use the SQL table to rewrite the constants page using FSO.
|