The key difference is that with cfscript syntax you know at compile time whether whitespace will be emitted somewhere in the code block because you have to explicitly output stuff with the writeOutput() function.

With tag based syntax whether you emit whitespace between tags depends on a combination of admin settings and whether cfprocessingdirective or cfsetting has caused whitespace to be supressed. All three of those are runtime settings, so the tag based code has to be compiled to check those settings and emit or suppress whitespace accordingly. That's where there will be a speed difference. How big that difference will be is probably not significant for most applications, but it does exist.

Spike

Dave Carabetta wrote:
On Sun, 3 Oct 2004 12:36:34 -0700 (PDT), Rob Rusher <[EMAIL PROTECTED]> wrote:

Might I suggest that you look at the decompiled java code produced by each
version of your code.

I have found that the non-cfscript version has more whitespace code generated
while the actual "meat" of the code is compiled to the same thing.

So, in general, cfscript produces faster code than its non-cfscript
counterpart.



Eh? The whitespace argument doesn't really apply in this case, I don't
think. In the end, you're talking about the compiled code that gets
executed on the server, which is whitespace-ignorant. What you really
want to compare is the *syntax* differences in the resulting Java
between coding with cfloop vs. cfscript loop.

The whitespace argument really applies to any space that might exist
in your resulting HTML page that CF generates in the output buffer.
That whitespace is sent to the browser, hence inflating the overall
page size the web server needs to serve and the browser needs to
download, thereby increasing overhead/load on both ends. Again,
though, this point doesn't apply to the cfscript vs. tag argument.

Regards,
Dave.
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' in the message of the email.


CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]


--

--------------------------------------------
Stephen Milligan
Code poet for hire
http://www.spike.org.uk

Do you cfeclipse? http://cfeclipse.tigris.org
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' in the message of the email.


CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]

Reply via email to