Believe the Hype

Brian Rinaldi has a pretty good article up on site point titled "Coldfusion 8: Believe The Hype".

While CF8 does indeed have huge speed improvements over earlier versions it's important to note that if you have developed using many of the frameworks you may actually experience a degradation in performance because of the sheer number of .class files that get generated.

As explained previously in an article by Mark Mandel the problem is in the Java 1.6 class loader and how it loads the classes into memory.

At server start up Coldfusion starts loading the generated .class files into server memory until the cache is full. Because of the class loader bottle neck this results in increased server startup times.

Mark further explains that in a Production environment where there are a huge number of .class files its entirely possible to experience unexpected and hard to reproduce performance hits as Coldfusion swaps out in-memory class files.

In order to fully appreciate CF8's speed and avoid the Java 1.6 bottleneck you will need to downgrade to 1.5 or wait until Sun publishes the fix.

Happy Friday...

[Editorial Note: Thanks Julian Halliwell for pointing out my mistaken use of createObject as the bottleneck instead of the Java class loader.]

Comments
Steve 'Cutter' Blades's Gravatar What is this 'patch from Sun'? That's the first I've heard of it. Any details?
# Posted By Steve 'Cutter' Blades | 2/22/08 1:04 PM
Gary Gilbert's Gravatar The Java version that shipped with ColdFusion 8 is 1.6.0_01 which contains the class loader bug. Sun has released several new builds bringinging 1.6 up to 1.6.0_04. I was under the impression that the lastest build fixed the problem but looking again at the bug report I see that it hasn't yet been released though it is marked as closed.

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id...
# Posted By Gary Gilbert | 2/23/08 3:52 AM
Jeff Fleitz's Gravatar Hey Gary, when I click on the 'ColdFusion 8: Believe the Hype' link, it takes me to your blog admin login page.
# Posted By Jeff Fleitz | 2/23/08 11:19 PM
Gary's Gravatar @jeff,

Doh, that's not good! Thanks for catching that!
# Posted By Gary | 2/24/08 7:21 AM
Julian Halliwell's Gravatar Quote: "the bug seriously impacts creatObject thereby making CFC instantiation really slow"

Gary, my understanding and experience is that it's just the initial class loading under the hood that's affected, not CFC instantiation/use of createObject() per se (which is on the contrary much faster then CF7).

So it's only when a function is first called following startup, or when it's been dropped from memory and needs to be reloaded that you get the delay.

It's annoying because application initialisation with new code can take minutes instead of seconds, but once the class files are loaded it hums along nicely.

Mark Mandel explains the detail here:

http://www.compoundtheory.com/?action=displayPost&...
# Posted By Julian Halliwell | 2/27/08 4:21 AM
Gary Gilbert's Gravatar @Julian,

Thanks for the correction!
# Posted By Gary Gilbert | 2/27/08 8:39 AM