Good topic!

I have an application that I set a number of variables (for every page).

Such as datasources, tablenames,  table widths, colors ect.. There are
probably 30-40 in all.

Right now I set those as
<cfset prefs.tablename = "customer_table">
<cfset prefs.dsn = "customers"
<cfset prefs.tableBGColor = "FFFFFF">
ect...

Would it be better to set them in the request scope?

I know that varables.dsn would be faster than my prefs.dsn, but  I wanted to
keep prefs. seperate from variables.

I do use alot of Custom Tags, but I just use caller.prefs.dsn to get the
desired results.

I guess I am asking should I look at what I am doing and maybe go a
different route?

Thanks
Paul Giesenhagen
----- Original Message -----
From: "Dave Carabetta" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, July 08, 2002 2:13 PM
Subject: Re: Application vs Request........


> >oi CF-Talk,!!
> >
> >   ok  don't  flog  me..  but  since  most  app variables are locked and
> >set to a
> >   request  scope......is  there any loss of "performance" or is just
> >putting all
> >   app  scoped  variables  as  request  scoped  variables  in the
> >application.cfm
> >   acceptable...?
> >
>
> The performance "degradation" is virtually negligible. For non-CFMX
> applications I write, I use local-scoped variables (variables or request,
> depending on if I need them for custom tags) in an included file in my
> Application.cfm file.
>
> In one scenario, I tested setting 30 variables with a stress testing tool
> (15 simultaneous threads over a 10 minute span) and the *worst* it ever
got
> was 28 milliseconds. Those results and others I've done make this approach
> much easier because I don't have to worry about locking (except in race
> conditions, of course).
>
> But that's just my approach. Others swear by locking. To each their own,
as
> long as you lock where appropriate.
>
> Regards,
> Dave.
>
>
> 
______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to