Visit the javapronews Directory
Blogs
Blogger, Blogosphere, Web 2.0...
Design Agencies
Professional, Design, Job...
Education
Communicate, Help, Learn...
Forums
Search, Learn, Communicate...
Java Developers
Skills, Build, Distribute...
Java Tutorials
books, help, Learning...
Javascript Tutorials
Help, Learn, Read...
News
Technology, Business, Web...

Submit your site for FREE

Java 6 and ColdFusion 8


Sean Corfield By: Sean Corfield

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

About The Author

Sean is currently Senior Computer Scientist and Team Lead in the Hosted Services group at Adobe Systems Incorporated. He has worked in the IT industry for nearly twenty-five years, first in database systems and compilers (serving eight years on the ANSI C++ Standards Committee), then in mobile telecoms, and finally in web development. Sean is a staunch advocate of software standards and best practices, and is a well-known and respected speaker on these subjects. Sean has championed and contributed to a number of ColdFusion frameworks, and is a frequent publisher on his blog, http://corfield.org/

Leave a Reply