On Tue, Jul 12, 2011 at 3:48 PM, Dave Watts <dwa...@figleaf.com> wrote: > >> remember, that cfml has to be compiled into java byte code, processed by >> JRUN and then executed by the JRE, so more steps involved and JRUN certainly >> uses far more system resources than ASP. > > That's not much different from what happens with ASP.NET pages. They > start as text, and have to be compiled into bytecode (MSIL, I think > it's called), then executed by the .NET runtime. And JRun using more > system resources shouldn't make a performance difference.
On .NET in an MVC app you have two different types of dynamic resources, the compiled C# code for your model and the .aspx pages for the views. Your model code gets compiled down to a dll, just like any other windows app and runs on the CLR (common library runtime). The views will be compiled the first time you hit them, like in CF, if you just copy them over. On the other hand, you can ship them precompiled (my installer build task does this) which takes away that first time hit but you can also do that with CF and use cfcompile to produce the java byte code and then distribute that. > I think the biggest reason for this performance difference is that CF > is quite a bit different from Java - loosely-typed vs strictly-typed, > etc. Whereas, if you write C# code, you're already telling the > compiler a lot more about what to do. And there are different ways of turning the same CF code into Java code. Adobe and Railo both produce different Java code for the same CF code in many cases and those choices have impacts on performance. >> The advantage of CF was never its execution speed, but rather its RAD speed. > > Exactly. And when most web applications spend most of their time on > database queries (which will likely be the same on various platforms) > who really cares that you can run 10000 iterations of something you'd > never actually do faster on platform A vs platform B? Database query speed is certainly a big element as is your approach to caching. Normal database queries will probably be similar in speed on .Net versus CF but there are some differences. The JDBC driver for SQL Server, for instance, doesn't support Table Valued Parameters which allows you to pipeline large numbers of statements in one connection. We had an import process that was doing on the order of 50,000 inserts/updates. In CF, even with connection pooling, it was taking hours. We switched to using TVP statements through an ADO.Net connection and dropped it down to a minute or two. Have to know the limitations of your tools. judah ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346208 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm