My testing agrees with this.  This flies in the face of what Chris Cortes
says in his book "Optimizing ColdFusion 5."  Page 404.  Or am I reading it
wrong?  Does anyone else have any beefs with this book?

Jochem - thanks for pointing me at GetTickCount().

Shawn

-----Original Message-----
From: Venn, Matthew [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 15, 2002 11:20 AM
To: CF-Talk
Subject: RE: cfoutput - was RE: cfset vs using cfscript


RecordSet contained 1000 results...
Using Cfoutput to loop through query: 50 ms
Using Cfloop contained with cfoutput tags: 50 ms
Using Cfloop with cfoutput tag contained within the cfloop tags: 170 ms

Matt

-----Original Message-----
From: Jochem van Dieten [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 15, 2002 11:01 AM
To: CF-Talk
Subject: Re: cfoutput - was RE: cfset vs using cfscript


Shawn McKee wrote:
> While on this topic, how about efficiency with cfoutput?
> 
> It makes sense to me that this:
> 
> <select name="fred">
>       <cfloop query="fredQ">
>               <option
> value="<cfoutput>#val#</cfouput>"><cfoutput>#valDesc#</cfouput>
>       </cfloop>
> </select>
> 
> is faster than this:
> 
> <cfoutput>
>       <select name="fred">
>               <cfloop query="fredQ">
>                       <option value="#val#">#valDesc#
>               </cfloop>
>       </select>
> </cfouput>

Please explain, because it doesn't make sense to me.


> But what about these?
> 
> <select name="fred">
>       <cfoutput query="fredQ">
>               <option value="#val#">#valDesc#
>       </cfoutput>
> </select>
> 
> <select name="fred">
>       <cfloop query="fredQ">
>               <option value="<cfoutput>#val#">#valDesc#</cfouput>
>       </cfloop>
> </select>

GetTickCount() is your friend. Enlighten us :)

Jochem




______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
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