I do the same thing especially with large numbers of variables, If nothing
else it keeps the code more organized for me.

-- 
Scott Stewart
ColdFusion Developer
 
SSTWebworks
4405 Oakshyre Way
Raleigh, NC. 27616
(919) 874-6229 (home)
(703) 220-2835 (cell)

-----Original Message-----
From: [STS] Ravi Gehlot [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 14, 2008 1:58 PM
To: CF-Talk
Subject: Re: Using tags with CFSCRIPT

Hey Scott,

        I spoke to a couple of my senior developer friends and they told me
that back in the days of CF5 cfscript was faster than tags but that doesn't
hold true with CF7 and 8 so it doesn't really matter. I prefer to code in
<cfscript></cfscript> blocks when I do imports...just my way of doing
things.


Ravi.

On Mon, Apr 14, 2008 at 12:59 PM, Scott Stewart <[EMAIL PROTECTED]>
wrote:

> "Use <cfscript> Instead of Three or More <cfset>s
> The reason is this: When you use cfscript, the entire block gets sent to
> the
> engine at once. So, ColdFusion has to make only one read. When you send
> three or more <cfset> statements, ColdFusion gets to interpret them once
> each, or three times. Therefore, it's faster and cleaner."
>
> From: http://www.informit.com/articles/article.aspx?p=24131&seqNum=3
>
> " Always use cfscript for blocks of variable assignments for values
> greater
> than one. It is significantly faster than cfset.
>
> Example: <cfscript> a=1; b=2; c=3; </cfscript>
>  Not: <cfset a=1> <cfset b=2> <cfset c=3>"
>
>
>
http://www.adobe.com/devnet/server_archive/articles/coding_for_performance.h
>
tml<http://www.adobe.com/devnet/server_archive/articles/coding_for_performan
ce.html>
>
> " pre-MX6.1 there was a performance gain.  Now, if I understand
> correctly, it all compiles down to the same java bytecode, so there's
> no performance gain to speak of."
>
> http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:43908
>
>
> While it may not be true for CFMX 7 & 8 it was a documented best practice
> for CF 5 and back. I've continued to use this method, especially when
> declaring multiple variables.
>
> --
> Scott Stewart
> ColdFusion Developer
>
> SSTWebworks
> 4405 Oakshyre Way
> Raleigh, NC. 27616
> (919) 874-6229 (home)
> (703) 220-2835 (cell)
>
> -----Original Message-----
> From: Dave Watts [mailto:[EMAIL PROTECTED]
> Sent: Monday, April 14, 2008 12:11 PM
> To: CF-Talk
> Subject: RE: Using tags with CFSCRIPT
>
> > Using CFScript should be a bit faster as CF processes the
> > CFScript block all at once as opposed to processing each
> > tag individually.
>
> I strongly doubt this, and have seen no evidence (load tests) that it's
> true
> now, even if it may have been true in the past (which I also doubt).
>
> Dave Watts, CTO, Fig Leaf Software
> http://www.figleaf.com/
>
> Fig Leaf Training: Adobe/Google/Paperthin Certified Partners
> http://training.figleaf.com/
>
> WebManiacs 2008: the ultimate conference for CF/Flex/AIR developers!
> http://www.webmaniacsconference.com/
>
>
>
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303335
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to