Print Page | Close Window

global variables : performance question

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=21538
Printed Date: 29 March 2026 at 10:57pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: global variables : performance question
Posted By: dfrancis
Subject: global variables : performance question
Date Posted: 09 October 2006 at 5:19pm

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.




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net