> > The downside to this of course is the memory overhead with
> > every request setting the same variables in memory for its
> > duration. Obviously NOT nice for anything beyond low, low, low
> > traffic sites. So I only use the Request scope like this for
> > backend CMS's for small companies where there really are
> > never going to be more than a few people in there at once.
>
> What?? Balderdash! (Wow, I've been waiting to use that word.) Yes,
when
> you use a request variable, you are storing something in memory, but
you
> could say the same thing about local variables as well.

I've zero experience of high-traffic sites. So when this topic
came up a while ago and a few people raised eyebrows at my
habitual "stick all vars used on every request by multiple pages
into the Request scope in Application.cfm" attitude, I kind of
assumed I was only OK in doing this on low-traffic sites such
as the ones I'm working on now.

But yeah, looking again and thinking through it, having

<cflock timeout="10" throwontimeout="No" type="READONLY"
scope="APPLICATION">
    <cfset variables.tempDSN=application.DSN>
</cflock>

before every <cfquery> every request would take up just as much
memory as

<cflock timeout="10" throwontimeout="No" type="READONLY"
scope="APPLICATION">
    <cfset request.DSN=application.DSN>
</cflock>

in Application.cfm, and using request.DSN for every <cfquery>. Or
maybe the former would take up more? If variables.tempDSN is
set 10 times in one request, does it take up 10 times as much
memory, or is it 'overwritten' each time?

I know the vars here are of a trivial size, but I'm curious as to
how all this works behind the scenes, for future reference :)

- Gyrus

~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- [EMAIL PROTECTED]
work: http://www.tengai.co.uk
play: http://www.norlonto.net
- PGP key available
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
______________________________________________________________________
Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
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