[thelist] ASP Application Variables: Are They "Expensive" to Access?
Scott Dexter
sgd at ti3.com
Tue Jun 5 13:33:41 CDT 2001
James --
> In theory, if I am accessing the same application
> variable more than
> once, it would seem more efficient to create a page-level variable and
> assign the value of the application variable to it. But I can
> also see that,
> if the application variable is a large chunk of data -- such as a
> multi-dimension array -- copying that data to a page-level
> variable might
> also be inefficient.
Yes, there is a cost to the assignment of the local variable, but the
benefits of using it vs the Application var multiple times outweighs it. Use
local (page) storage.
Although fast, a call to an Application variable has to cross thread
boundaries (I think) to get to it; whereas a page-scope variable is
available in the same thread, in the same memory pool as the instance of the
parser that's chugging through the page.
> what say you?
I say local var. Also (in my mind) helps with debugging/maintenance....
sgd
More information about the thelist
mailing list