Re: constants in global.asa

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Bob Barrows [MVP] (reb01501_at_NOyahoo.SPAMcom)
Date: 02/06/05


Date: Sun, 6 Feb 2005 08:26:39 -0500

2obvious wrote:
>> When constants are used, the constant values are
>> written into the compiled code at compile-time.
>> When variables are used, memory is allocated to
>> contain the values that will be supplied at runtime.
>
> I thought Active Server Pages were interpreted, not compiled.

This might help:
http://blogs.msdn.com/ericlippert/archive/2003/10/21/53264.aspx

>
>> There is no such thing as a read-only variable. If
>> that is truly what you want, then you need to use
>> include files or classes.
>
> Wait! --And Application variables can't be arrays or objects, they're
> just your run-of-the-mill untyped variable? Hmm.

No, they can be arrays. They can even be objects. However, just because you
can put an object in application or session does not mean that you should.
Only free-threaded objects should be put in application or session.
Otherwise, your application becomes thread-bound, which serializes all uses
of the object, killing performance.
http://www.aspfaq.com/2053

Bob Barrows

-- 
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM" 


Relevant Pages

  • Re: headers sent issue
    ... huge waste of resources, cpu & memory. ... You are using memory for buffering that hypothetically could be needed ... will keep the use of memory & CPU to a minimum. ... start session ...
    (comp.lang.php)
  • Re: headers sent issue
    ... huge waste of resources, cpu & memory. ... You are using memory for buffering that hypothetically could be needed ... will keep the use of memory & CPU to a minimum. ... start session ...
    (comp.lang.php)
  • Re: memory leak in asp 2.0
    ... If to be placed into session it should exist in session then it will ... put object which refers to web service into session I will not put into ... so I was able to watch how much memory I need. ... When I load first page the memory ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: ASP.NET High memory usage
    ... As for the memory consumpting issue you mentioned, I think the Session ... applicaiton's memory usage, you can use the application sever's performance ... How can we measure the total session memory consumption for a worker ...
    (microsoft.public.dotnet.framework.performance)
  • Re: ASP.NET memory management
    ... As Jason has mentioned, generally we are recommended not to store large ... recommend to use since object stored there won't be automatically cleared. ... you're using 2k3 server with iis6, there is a memory recycle limit setting ... | shouldn't really be living on the Session except as a last resort. ...
    (microsoft.public.dotnet.framework.aspnet)