Yes, I was confusing the two ... but I do realize it can be set outside of
Application.cfm

Would in this case it be a perferred method over the request scope?

Here is my take on it ...and I may be waaay off ...  The application scope
keeps in memory while request and local variables dump out of memory after
the page has been loaded...  ----> second question would be again on
performance, does that really matter relative to the number of items being
set (40-100)?  I can't see where it would be, but ever 02 millisecond and
bits of memory saved is always a good thing ... with exceptions.

Paul Giesenhagen
QuillDesign

> Maybe I am misreading your question, but I think you are confusing the
> Application.cfm file and the application scope. To put something in the
> application scope it doesn't have to be declared in the Application.cfm
> file. You can simply do the following...
>
> <cfset application.whatever = "whatever">
>
> Matt Liotta
> President & CEO
> Montara Software, Inc.
> http://www.montarasoftware.com/
> V: 415-577-8070
> F: 415-341-8906
> P: [EMAIL PROTECTED]
>
> > -----Original Message-----
> > From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, July 24, 2002 10:17 PM
> > To: CF-Talk
> > Subject: Re: local vs. request
> >
> > Ahhh... Application ... I guess I will bump up the question, these
> could
> > actually be put into the Application, as like I said, they are called
> for
> > every page ... these values are dynamically written to a file and then
> > called as an include ... would it be better 'practice' to dynamicall
> write
> > the preference file(s) and then include them in the Application.cfm
> file?
> >
> > I know that this sound very basic, but I am not too proud to ask :)
> >
> > Paul Giesenhagen
> > QuillDesign
> >
> >
> > > Correct, I would think the request scope would be better for global
> > > variables than passing them to custom tags. Remember that the
> copying of
> > > variables happens for each call to a custom tag, so if you had 40
> > > variables that need to be passed for 40 different calls to custom
> tags
> > > then that is a total of 1600 copies. Although, if you are using
> quite a
> > > number of global variables you may also want to look into using the
> > > application scope.
> > >
> > > Matt Liotta
> > > President & CEO
> > > Montara Software, Inc.
> > > http://www.montarasoftware.com/
> > > V: 415-577-8070
> > > F: 415-341-8906
> > > P: [EMAIL PROTECTED]
> > >
> > > > -----Original Message-----
> > > > From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
> > > > Sent: Wednesday, July 24, 2002 10:04 PM
> > > > To: CF-Talk
> > > > Subject: Re: local vs. request
> > > >
> > > > So in the case of 40 or so variables.whatever being set, you like
> the
> > > idea
> > > > of setting them as request.whatever and thus the custom tags can
> use
> > > these
> > > > settings without having to dupe up on them either as attributes or
> > > calling
> > > > the preference file within the custom tag.
> > > >
> > > > I just want it to make sense to those who are looking at the code.
> > > > (comment
> > > > away!)
> > > >
> > > > Thanks
> > > > Paul Giesenhagen
> > > > QuillDesign
> > > >
> > > > ----- Original Message -----
> > > > From: "Matt Liotta" <[EMAIL PROTECTED]>
> > > > To: "CF-Talk" <[EMAIL PROTECTED]>
> > > > Sent: Wednesday, July 24, 2002 11:57 PM
> > > > Subject: RE: local vs. request
> > > >
> > > >
> > > > > Just to note, there is a performance difference between your two
> > > > > methods. Specifically, passing data through the attributes scope
> of
> > > a
> > > > > custom tag causes a copy of the variable to happen. As you can
> > > imagine
> > > > > copy variables can have a performance impact if there is a
> > > significant
> > > > > number of variables to copy and/or variables with a large amount
> of
> > > > > data.
> > > > >
> > > > > Matt Liotta
> > > > > President & CEO
> > > > > Montara Software, Inc.
> > > > > http://www.montarasoftware.com/
> > > > > V: 415-577-8070
> > > > > F: 415-341-8906
> > > > > P: [EMAIL PROTECTED]
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: Dave Watts [mailto:[EMAIL PROTECTED]]
> > > > > > Sent: Wednesday, July 24, 2002 9:52 PM
> > > > > > To: CF-Talk
> > > > > > Subject: RE: local vs. request
> > > > > >
> > > > > > > I have an application that sets many different local
> > > > > > > variables (about 40 or so) on each page load ... We are
> using
> > > > > > > a few custom tags here and there and it would be great to
> use
> > > > > > > the request scope instead of local just for ease of use.
> > > > > > >
> > > > > > > Does anyone have any comments on performance of setting
> local
> > > > > > > vs. request scope variables?  What if any are some of the
> > > > > > > drawbacks of going this way?  Resources, speed ect..
> > > > > >
> > > > > > It will make absolutely no noticeable difference as far as
> > > > > performance. It
> > > > > > will only make a difference in a conceptual sense. By that, I
> mean
> > > > > that if
> > > > > > you write CFML custom tags with clearly defined inputs and
> outputs
> > > (to
> > > > > the
> > > > > > degree that you can clearly define outputs in custom tags),
> the
> > > > > Request
> > > > > > scope won't be especially useful; on the other hand, you can
> write
> > > > > your
> > > > > > custom tags a little more loosely so that they take advantage
> of
> > > the
> > > > > > Request
> > > > > > scope. Personally, I generally prefer the first approach.
> > > > > >
> > > > > > But again, it won't affect performance one way or the other.
> > > > > >
> > > > > > Dave Watts, CTO, Fig Leaf Software
> > > > > > http://www.figleaf.com/
> > > > > > voice: (202) 797-5496
> > > > > > fax: (202) 797-5444
> > > > > >
> > > > >
> > > >
> > >
> >
> 
______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to