Todd,
>
> Any idea which is faster?
>
CFSET is faster of course, but i think that you'll find that cfparam is
faster than :
<cfif NOT Isdefined("scope.variablename")>
<cfset scope.variablename = something>
</cfif>
> > The flags
> > could be stored in a fast access location rather than a variable look
> up/variable verification in memory somewhere.
>
> Such as?
>
I think you're getting in too deep to something that you really don't need
to worry about too much.
Here is a quick run down of ways you can set variables in CF:
<CFSET variable = something> is a straight create/overwrite
<CFPARAM name="variable" default="something"> will only set the variable if
it isn't already created (this is quicker than the above IsDefined if
statement above.
<CFSCRIPT>
variable = something;
</cfscript>
is apparently (never tested it myself) quicker than doing a CFSET if you are
handling a lot of variables or if you're used to VB or JS.
However, in application.cfm you should only really be setting application,
session or client variables. Do you really want to be overwriting an
application variable when someone else may be trying to read that variable?
Regards
Stephen
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.