Submit Your Article
Home Articles News Tutorials Videos Add An Article
Topics: Design Photoshop Programming PHP CSS Java Database Web Development Javascript Ajax
– Close + Open

Find Out More About DevWebPro!

Sign up for the newsletter


» Terms & Conditions

Welcome to the New DevWebPro!

DevWebPro Includes:
  Hundreds Of Tutorials   Developer News
  Unique Gadget Videos   Tons of Topics to Discuss
  Expert Advice   We Will Publish Your Articles

Java 6 and ColdFusion 8

By: Sean Corfield
Tuesday, December 11th, 2007
Text: Decrease Font Size Increase Font Size | Print Print Article | Share: Delicious Digg StumbleUpon Post to Twitter Post to Facebook

Some people have been noticing dramatically slower application startup times on ColdFusion 8 compared to ColdFusion MX 7.

I’ve seen a lot of complaints about shared hosting systems where applications timeout.

Since CF8 is so much faster than CFMX7, you might wonder why application startup times can be so much worse.

The answer is Java 6. For all the other performance improvements and increased functionality in Java 6, it introduced a bug in the class loader that causes substantially slower class loading.

You can see a discussion of the problem on Sun’s forums.

I rolled my Mac back from Java 6 Developer Preview to Java 5 and noticed a huge difference: an application that took six and a half minutes on Java 6 to start from cold, on a server with no class files in cfclasses, took around 50 seconds on Java 5.

You’re only going to see this on applications that cause a large number of classes to be loaded at startup, i.e., framework-based applications that rely heavily on CFCs.

You actually suffer the slow class loading on all applications but it’s particularly noticeable on framework-based apps, especially ones that use Transfer (due to the high number of class files generated).

My recommendation for the time being is to ensure you are using Java 5 to power ColdFusion 8.

On a Mac that’s easy because Java 5 is the default JDK and CF8 automatically uses it.

On Windows and Linux, you’ll need to download and install the Java 5 JDK and then change your environment variables so that CF8 picks the right JDK (start CF8 from the console and you can easily see what JDK it is using).

Adobe are aware of the issue (in fact, they pointed us at the discussion on Sun’s forums).

Comments

Topics: ,

About the Author:
Sean is currently Chief Technology Officer for Railo Technologies US. He has worked in IT for over twenty five years, starting out writing database systems and compilers then moving into mobile telecoms and finally into web development in 1997. Along the way, he worked on the ISO and ANSI C++ Standards committees for eight years and is a staunch advocate of software standards and best practice. Sean has championed and contributed to a number of CFML frameworks and was lead developer on Fusebox for two years.
DevWebPro is an iEntry Network ® publication - © 1998-2010 All Rights Reserved