0
Does cfscript output faster???
New Here
,
/t5/coldfusion-discussions/does-cfscript-output-faster/td-p/757995
Feb 15, 2009
Feb 15, 2009
Copy link to clipboard
Copied
Hello to All!!!
I need to output a table with query data. If I do it with cfscript, I'll have to write:
<cfscript>
writeoutput ("<div id = test><table border =0>");
writeoutput ("Here are my HEADERS of table");
for (x = 1; x LTE qMy.RecordCount; x=x+1) {
writeoutput ("<tr><td>#qMy.a#</td><td>#qMy.b#</td><td>#qMy.c#</td>.......</tr>");
}
writeoutput ("</table></div>");
</cfscript>
So I have to do:
1 for_loop and
3 writeoutputs.
Does this method faster then use <cfloop = query> or simple <cfoutput> ?????
And what about "rules" for html tags, if I want to use "cfscript output" for outputting html code?
Thanks for your answers!!!!
I need to output a table with query data. If I do it with cfscript, I'll have to write:
<cfscript>
writeoutput ("<div id = test><table border =0>");
writeoutput ("Here are my HEADERS of table");
for (x = 1; x LTE qMy.RecordCount; x=x+1) {
writeoutput ("<tr><td>#qMy.a
}
writeoutput ("</table></div>");
</cfscript>
So I have to do:
1 for_loop and
3 writeoutputs.
Does this method faster then use <cfloop = query> or simple <cfoutput> ?????
And what about "rules" for html tags, if I want to use "cfscript output" for outputting html code?
Thanks for your answers!!!!
TOPICS
Getting started
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/coldfusion-discussions/does-cfscript-output-faster/m-p/757996#M70589
Feb 15, 2009
Feb 15, 2009
Copy link to clipboard
Copied
With cfscript you add complexity and nothing else. cfoutput
with a query attribute is the simplest and most efficient way to
accomplish your goal.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/coldfusion-discussions/does-cfscript-output-faster/m-p/757997#M70590
Feb 15, 2009
Feb 15, 2009
Copy link to clipboard
Copied
> Hello to All!!!
> I need to output a table with query data. If I do it with cfscript
I don't see the benefit of using CFScript in a scenario like this: you're
just making work for yourself.
For code of such trivial complexity, any performance differences in the
execution time of CFScript vs CFML will be inconsequential.
Your aim here should be to write good clear code; and CFML is going to be
clearer in this case. IMO.
--
Adam
> I need to output a table with query data. If I do it with cfscript
I don't see the benefit of using CFScript in a scenario like this: you're
just making work for yourself.
For code of such trivial complexity, any performance differences in the
execution time of CFScript vs CFML will be inconsequential.
Your aim here should be to write good clear code; and CFML is going to be
clearer in this case. IMO.
--
Adam
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Contributor
,
LATEST
/t5/coldfusion-discussions/does-cfscript-output-faster/m-p/757998#M70591
Feb 18, 2009
Feb 18, 2009
Copy link to clipboard
Copied
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

