Forum Themes:
Welcome !

 Variable declaration request

Author Message
DStanfield

  • Total Posts : 58
  • Reward points : 0
  • Joined: Mar 29 '02
  • Status: offline
Variable declaration request Sat. Oct 19, '02 9:46 AM (permalink)
0
First of all let me say this is such a great forum, so easy to use and the code is clean and easy to follow.

With that said, I was thinking of all the variables you have defined. How you define them very close to where they are being used and I had a question this.

I have seen other applications use a single include file for all variable declarations that will be used within the app. Whether it is used once, multiple times or not at all per page. What is your take on the performance issues of doing something like this so that the variables are declared sort of globally like this? Is there any?

Dewyatt
 
#1
    Samuel

    • Total Posts : 11853
    • Reward points : 180670
    • Joined: May 23 '01
    • Status: offline
    RE: Variable declaration request Sat. Oct 19, '02 2:38 PM (permalink)
    0
    Performance-wise, I don' t think it is going to make too much difference. All the variables are late-bound, of the variant type in VBS no matter how you declare them.

    It is just a matter of preference in my opinion. Declaring variables closer to where they are used should be faster, especially for pages that are mostly static content (e.g. all HTML with a line to write out the current date.). However, you will not notice it because the slowest thing in this server-client environment is still the connection.
    ASPPlayground.NET
    ~ see our Version 4 plans here

     
    #2
      Online Bookmarks Sharing: Share/Bookmark

      Jump to:

      Current active users

      There are 0 members and 1 guests.

      Icon Legend and Permission

      • New Messages
      • No New Messages
      • Hot Topic w/ New Messages
      • Hot Topic w/o New Messages
      • Locked w/ New Messages
      • Locked w/o New Messages
      • Read Message
      • Post New Thread
      • Reply to message
      • Post New Poll
      • Submit Vote
      • Post reward post
      • Delete my own posts
      • Delete my own threads
      • Rate post

      2000-2012 ASPPlayground.NET Forum Version 3.9