I hate it when I see this, makes it hard to read and hard to maintain. 

Technically cfoutput is a tag, and having CF go in/out of a ton of tags is
slower then going in/out of only a few. Although, granted we are talking
hundreds of a ms, so we'll never notice it. In older versions cf had to
parse everything inside the cfoutput tags, at runtime, now the compiler
takes care of that.

I would say it's really a toss up, performance wise. But it's a lot easier
to read and maintain if there are fewer cfoutput tags around everything. At
least I think so.

--nimer


-----Original Message-----
From: Adam Haskell [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 10, 2005 10:18 AM
To: CF-Talk
Subject: Few cfoutput Vs Many cfoutput

I am sifting through some inherited code and it is littered with CFoutputs
everywhere...
For example:

 <select name="<cfoutput> #sel_name#</cfotuput> <option
value="<cfoutput>#sel_value#</cfoutput>">
<cfoutput>#sel_text#</cfoutput>
</option>
</select>
 

I figured it was done b/c somone jsut didn't know any better, but I am
seeing it where I would think the individual writting it wouldn't do it that
way. Why would anyone code like this as opposed to just throwing a cfoutput
at the beginig of a page and the end, assuming they are ussing something
other than <cfsetting> to control white space.

One co-worked claimed he did it for performance he thought it would parse
quiker, in CF5...I disagree.

Adam H



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:194082
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to