Todd, Would it be safe to say that the underlying code generated by a CFSCRIPT block on CFMX would be virutally the same as code compiled using tag syntax?
-mk -----Original Message----- From: [EMAIL PROTECTED] [mailto:todd@;web-rat.com] Sent: Wednesday, November 13, 2002 8:10 AM To: CF-Talk Subject: Re: cfscript book Just becareful with mimicing cfinclude. I would hestitate to say that cfscript block would bring you any performance gains under CFMX due to the compiling. Do your own speed test: test.cfm: <cfset begin = getTickCount()> <cfset finalIndx = 0> <cfloop index="indx" from="1" to="100" step="1"> <cfset finalIndx = incrementValue(finalIndx)> </cfloop> <cfset end = getTickCount()> <cfset total = end - begin> <cfoutput>#end# - #begin# = #total#</cfoutput> test1.cfm: <cfscript> begin = getTickCount(); finalIndx = 0; for(indx=1;indx LTE 100; indx=indx+1){ finalIndx = incrementValue(finalIndx); } end = getTickCount(); total = end - begin; writeoutput(end & "-" & begin & "=" & end); </cfscript> test.cfm results: 2107909460 - 2107909460 = 0 test1.cfm results: 2107965773-2107965773=0 Not that this is an accurate test, but ... where's the gain in cfscript? In the above case, you'll see that the regular <tags> were somewhat faster than the cfscript block. ~Todd On Wed, 13 Nov 2002, Pete Ruckelshaus wrote: > Personally, I prefer using CFScript over "regular" CF when I can use it. > First, it's much easier to set a bunch of variables inside a CFScript block > (IMO). Second, I find it easier to "read" CFScript logic blocks. Finally, > it IS faster when you do something beyond very basic stuff, and (again, IMO) > it makes for a more compact page of code. Add to that a bunch of _GREAT_ > UDF's in CFLIB (http://www.cflib.org/) and you CAN actually mimic the > functionality of a good number of regular CF tags. > > Pete > > ----- Original Message ----- > From: "Tony Weeg" <[EMAIL PROTECTED]> > To: "CF-Talk" <[EMAIL PROTECTED]> > Sent: Tuesday, November 12, 2002 3:57 PM > Subject: RE: cfscript book > > > > now I am asking all of these questions, is cfscript really that good to > > use? > > or could I go all day long using cftags and never see much performance > > difference.... > > > > ..tony -- ============================================================ Todd Rafferty ([EMAIL PROTECTED]) - http://www.web-rat.com/ | Team Macromedia Volunteer for ColdFusion | http://www.macromedia.com/support/forums/team_macromedia/ | http://www.devmx.com/ - Todd (Moderator / CoFounder) | http://www.flashCFM.com/ - webRat (Moderator) | Speakeasy DSL - http://www.speakeasy.net/refer/18280 | ============================================================ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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 This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting.