Re: cfoutput abuse

This is a discussion on Re: cfoutput abuse within the Cold Fusion forums in Application Servers & Tools category; but once the sample2 code is compiled, i believe that there shud be no difference in execution speed. does not the bytecode perform the necessary adjustments ??...

Go Back   Application Development Forum > Application Servers & Tools > Cold Fusion

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 08-26-2008, 10:55 AM
codism
Guest
 
Default Re: cfoutput abuse


but once the sample2 code is compiled, i believe that there shud be no difference in execution speed. does not the bytecode perform the necessary adjustments ??
Reply With Quote
  #2  
Old 08-26-2008, 11:10 AM
Ian Skinner
Guest
 
Default Re: cfoutput abuse

codism wrote:
> but once the sample2 code is compiled, i believe that there shud be no difference in execution speed. does not the bytecode perform the necessary adjustments ??


Pretty much, or if there is a difference it is very tiny and would not
really compensate for hard to read and maintain code.

The following does not really apply to the example you provided, but
using <cfoutput>...</cfoutput> block somewhat like your second example
can be explained as a form of whitespace management.

If one uses the <cfsetting enableCFoutputOnly="true"> tag, then only
content inside of <cfoutput>...</cfoutput> blocks will be sent in the
response. This can be used to control whitespace something like this.

<cfsetting enableCFoutputOnly="true">
<!--- A bunch of cf processing --->
<cfloop this...>
<cfloop that...>
<cfquery something ...>

<!---output the results--->
<cfouput>What needs to be seen</cfouput>

<!---More cf processing --->
<cfset something equals somethingElse>
<cfif this or that>
<cfswitch experssion="#justForFun#">

<!---again output the results--->
<cfoutput>Only this will be seen</cfoutput>
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 06:54 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.