Java and CFC instantiation, comparing ColdFusion engines
Posted At : November 30, 2006 10:52 AM
| Posted By : Mark Drew
Related Categories:
coldfusion
Yesterday I posted my comparative tests between creating a CFC and a Java object, Andy Jarett mentioned in a post that I should try out the different engines: Adobe ColdFusion, BlueDragon and Railo and see how they stacked up against each other. So I run the *SAME* code on each of the engines, of course I had to put my Generic.jar file into the classpath for each engine to have access to it.
In the test I used Bluedragon 6.2.1, Coldfusion MX 7.0.2 and Railo 1.1, and pointed them to the same webroot*.
The results are fairly erratic but that is because I didnt run them a number of times, no, I didnt put trusted cache on all the engines, as I know this should improve performance but it is comparative right?
So, the results?
They speak for themselves. At the end of the day its a lot faster to use a Java class than a CFC.
CFC based GenericBean

Java based GenericBean

*I shall provide details on how to do this later on today



1. What are we getting for the additional overhead? Are we getting some added functionality with cf and bd because all of their objects extend the generic object? Is it worth it/necessary?
2. Do you think you would get similar results on different operating systems or with different jvms?
3. Is cfc performance on the cf8 plate?
I could see this being of great importance to those that wish to return arrays of objects from their gateway components. While in some cases, like flex/remoting, you might need to do that in order for the client to be able to make sense of the results, but for straight cf, I generally just return a recordset and save bean instantiation for the details.
BDJX vs CFMX 7.02 on Jrun Vs Railo
or BD vs cfmx 7.02 vs Railo all running on the same underlying j2ee server
with the same default jvm settings etc. If not is it a true comparison ?
They are "default" installs of the engines, i.e. I downloaded it and run it. if this is an issue for you then I can re-do the tests. The tests in themeselves are more pointing to the use of CFC's vs Java objects as has been the whole trend of my recent posts, so I am not going to start doing specific performance metrics.
I havent *tweaked* any of the engines and I am sure you can eek more speed out of them with individual tunings, but this is kind of "out of the box" installs.
These have been an interesting set of blog entries. I've done some performance testing on cf 5/cfmx 7.0.2 in regards to cfinclude, custom tags, cfscript, cfc, createobject and have found cfc lacking. I don't code for my performance (ie., frameworks) but the user performance.
Fair enough, i'd only seen this post, I was curious to find our more about the
test platform. Your observations with cfcs are similar
to mine actually. Which is why when we wrote our framework for the
core api using UDFs. And only used cfcs where it made sense i.e it wasnt
a simple library of functions.
Id be interested to see the performance of BD7.0 beta 2 in the mix.
MD
Stephanie
MD
See my response here:
http://blog.newatlanta.com/index.cfm?mode=entry&am...