Mike:
I like using the request scope for "constants" like that. There is very
small performance decrease because you are setting the request variable
every request, however the request scope can be accessed in any page then
during that request.
Greg
----- Original Message -----
From: "Simon Horwith" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, December 11, 2000 2:21 PM
Subject: RE: Application.variables vs local.variables
> by checking for an application variable and setting the DSN to an
> application scoped variable in the event that the variable does not exist,
> you require the CFAS to set the variable only every once in a while,
rather
> than everytime a page is requested. This is ideal from a performance
point
> of view.
>
> ~Simon
>
> > Simon Horwith
> > Certified ColdFusion Developer
> > Fig Leaf Software
> > 1400 16th St NW, # 220
> > Washington DC 20036
> > 202.797.6570 (direct line)
> > www.figleaf.com
> >
>
>
> -----Original Message-----
> From: Mike [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 11, 2000 5:08 PM
> To: CF-Talk
> Subject: Application.variables vs local.variables
>
>
> Is it better to set an application variable in the application file rather
> than just setting a local variable especially for a variable that's not
> going to change such as local.dsn then you do not have to lock reads
>
> or lock read and assign local.dsn equal to application.dsn
>
> or just lock all read of application.dsn
>
> Most importantly why would one be better ?
>
> It seem to me it might be best just to set local.dsn in the application
file
> and have done with it.
>
> I'm not talking about variables that have change like counter or something
> of that nature.
>
> thanks Mike
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists