Agreed...

We've been unable to confirm either, and attempt to do as much as is
reasonable to limit the amount of parsing for ANY CF tag.  However,
we're especially careful when we have a template that gets heavy usage
or will pull a lot of data.


Lee Fuller
Chief Technical Officer
PrimeDNA Corporation / AAA Web Hosting Corporation
"We ARE the net."
http://www.aaawebhosting.com




> -----Original Message-----
> From: Mark A. Kruger - CFG [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, February 01, 2002 2:48 PM
> To: CF-Talk
> Subject: RE: Best Practice on using/optimizing cfoutput and cfloops
> 
> 
> The issue with Cfoutput is that it parses everything between 
> the two tags looking for CF variables to output -including 
> any HTML that might be between the tags. If you have a lot of 
> HTML between your <cfoutput></cfoutput> tags, and just a few 
> variables, you are making CF wade through a lot of code that 
> it doesn't need to.  However, the penalty in many cases is 
> negligable and should be ignored in favor of the ease of use 
> (don't you hate going through and bracketing every little 
> thing in CF output tags?). In our own testing we have been 
> unable to prove that <cfoutput> is slower than a comparable 
> cfloop - but we do make an effort to make the HTML that is 
> between a <Cfoutput query="yada"></cfoutput> tags reasonably lean.
> 
> Mark
> 
> -----Original Message-----
> From: Dave Carabetta [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 01, 2002 12:33 PM
> To: CF-Talk
> Subject: Re: Best Practice on using/optimizing cfoutput and cfloops
> 
> 
> I would actually disput that claim. I can't find the article 
> for the life of me, but I think Michael Dinowitz or somebody 
> wrote an article some time ago comparing the two methods. 
> From what I remember CFLOOP is faster because it is a "dumbed 
> down" way of outputting your data. It doesn't look for record 
> set counts or anything, it just loops over whatever you give 
> it. I wish I could support this claim with valid links to 
> writings, but I know I have heard and read that CFLOOP is faster.
> 
> Dave.
> 
> 
> ----Original Message Follows----
> From: "Paul Giesenhagen" <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> To: CF-Talk <[EMAIL PROTECTED]>
> Subject: Re: Best Practice on using/optimizing cfoutput and cfloops
> Date: Fri, 1 Feb 2002 12:47:24 -0600
> 
> <cfoutput> is much faster than cfloop .... always try to use 
> cfoutput when you can.
> 
> Paul Giesenhagen
> QuillDesign
> http://www.quilldesign.com
> SiteDirector - Commerce Builder
> 
> 
> 
>  > I am wondering if anyone can advise if one practice 
> (below) is more  > efficient than the other.  >  >  > 
> Practice 1: Enclosing every instance on #variables# in 
> cfoutput tags  >  > <body>  > <cfoutput query="query_name">  
> > #query_variable#  > </cfoutput>  > </body>  >  >  >  > 
> VERSUS  >  >  >  > Practice 2: Enclosing the entire code in a 
> single cfoutput and use cfloop  > when necessary  >  > <body> 
>  > <cfoutput>  > <cfloop query="query_name">  > 
> #query_variable#  > </cfloop>  > </cfoutput>  > </body>  >  > 
>  >  > Any advise to demystify any 'performance penalties' 
> would be appreciated.  >  >  >  > Thanks,  >  > Michael  >
______________________________________________________________________
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