My thought is yes.

At 10:13 AM 08/22/2001 -0400, you wrote:
>Folks,
>
>I have a (possibly) huge structure being maintained in Session scope. I am
>in the process of making sure that I have all the appropriate locks when
>referring to the structure.
>
>My question is this:
>
>One of my templates makes a number of references (some read only, some
>write) to this structure. Is it better for me (performance-wise) to make a
>duplicate of the session structure in the Request scope and place the locks
>around that copy thereby no longer needing locks around the other
>references, Or is it better just to put locks on all the other references?

  I say, copy it to the request scope (Or even the variables scope).  Make 
sure you use the duplicate function, otherwise you are just copying a 
pointer and all access will still need locks (if that makes sense?) .


>Is this simply a matter of how many references there ans some number of them
>make a break-even point?

  I'd recommend running some numbers to see how they turn out.  You might 
look at it this way:

   Everytime you call a CF tag, you make a call to a C function.

   <CFLOCK>
     <CFSET request.tempsession = session>
   </CFLOCK>

  You made two calls, here.  So, the break even point is when you make two 
calls to the session variables.  This, of course, assumes that all CF tags 
take an identical amount of time to execute which is (obviously) a flawed 
assumption.  It may give you food for thought or a point of reference, though.





--
Jeffry Houser | mailto:[EMAIL PROTECTED]
AIM: Reboog711  | ICQ: 5246969 | Phone: 860-229-2781
--
I'm looking for a room-mate in the Hartford CT area, starting in August
--
Instant ColdFusion 5.0  | ISBN: 0-07-213238-8
http://www.instantcoldfusion.com
--
DotComIt, LLC
database driven web data using ColdFusion, Lotus Notes/Domino
--
Far Cry Fly, Alternative Folk Rock
http://www.farcryfly.com | http://www.mp3.com/FarCryFly
--
Change is good


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
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