DStanfield
-
Total Posts
:
58
-
Reward points
:
0
- Joined: Mar 29 '02
-
Status: offline
|
Variable declaration request
Sat. Oct 19, '02 9:46 AM
( permalink)
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
|
|
|
|
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)
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
|
|
|
|