Thanks for sharing your thought.  I don't know how others do their coding, in my practice, I usually set application variables at the application.cfm template level, it's really global variables, rarely changed.

> In CF5 you're supposed to lock ALL shared scope access to avoid
> memory
> corruption.  With CFMX you only have to lock for avoidance of race
> conditions, because the underlying java runtime deals the memory
> issues.
>
> Clustered environment doesn't matter, because CFLOCK is local to the
> machine in question, not the cluster.
>
> If application variables (including instance variables of any
> application-scope CFCs) are set to a value and never change
> (exceedingly rare), then yes, you can skip locking.  However, you may
> as well just set them into the request scope, since they're going to
> be set every request.  You can use CFLOCK in this situation to only
> load the variables once and improve performace.  If you're
> instantiating large CFCs, the performance increase can be huge.
>
> cheers,
> barneyb
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to