I'm not sure this is true with CFMX any more, because of precompilation,
although I could be wrong.  It might change with RedSky as well, because I
think MM did some stuff with the compilation cycle, but again, I'm not sure.

The reason I say this is because the evaluation of what has to be parsed for
variable, and what is static text happens at compile time, not runtime.  At
runtime everything is either a static string, or a variable.  With CF5 and
less, compile time happed at every runtime, so there was a real cost, but
with CFMX it'll only affect the first request (no compile cycle after that).

Regardless of all that mumbo-jumbo, I'd say wrap your block in a single
CFOUTPUT, because it makes the code easier to read.  The performance hit is
going to be minimal compared to a DB access or something, so unless you're
to the knife's edge on optimization, the readability and maintainability is
way more valuable.

barneyb

---
Barney Boisvert, Senior Development Engineer
AudienceCentral
[EMAIL PROTECTED]
voice : 360.756.8080 x12
fax   : 360.647.5351

www.audiencecentral.com


> -----Original Message-----
> From: Rich Z [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 26, 2003 12:02 PM
> To: CF-Talk
> Subject: The Verbosity of CFOUTPUT
>
>
> I am a big fan and advocate of CFML, but I have to confess, I've grown
> so tired of wrapping cfoutput tags around values like
> <CFOUTPUT>#this#</CFOUTPUT>. Now I know I could put Cfoutputs at the top
> and bottom of my page (or block) and save myself some hassle, but I've
> read in numerous places that this is bad practice and resutls in a
> performance hit.
>
> So, at the risk of sounding like a brat (heh), is there a way to
> shortcut this kind of output? I know asp has <%= . %> etc. and JSP has
> something similar. I think my pages would look a lot cleaner if I could.
>
> Thanks,
> Rich
>
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

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

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to