Browse Prior Art Database

High-performance serialising ClassLoader for large Java applications

IP.com Disclosure Number: IPCOM000032453D
Original Publication Date: 2004-Nov-05
Included in the Prior Art Database: 2004-Nov-05
Document File: 2 page(s) / 46K

Publishing Venue

IBM

Abstract

Large Java* application can spend a large proportion of execution time at startup. Attaining high performance at startup is becoming an issue for the user-experience of the product. This article discusses a method for improving startup performance of Java applications by increasing the efficiency of disk access during startup.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 53% of the total text.

Page 1 of 2

High-performance serialising ClassLoader for large Java applications

One major factor affecting startup time of a Java* application is that there may be many classes to load from many different Jar files in many locations. Although CPU speeds are accelerating the disk access is still noticeably very slow. Each time an application is executed the set of loaded classes is largely the same but no optimisations currently take advantage of this knowledge.

    The JVM has a "permanent" area where classes are loaded into, this is logically different from the objects which are a "class with state". As classes are referenced for the first time in the application, the JVM searches for them then loads them into this "permanent" area.

    One could write a classloader, or amend the JVM itself, in such a way that it would write out the "permanent" area to disk.

A new flag could be added to that specifies a "permanent" seed file which is loaded in before normal classloading is attempted. This could be of benefit in applications which access many different files such as those which don't use jar files those which use LOTS of jar files [ eg Eclipse ] by serialising/streaming access to those classes we could get a vastly improved data transfer rate. It also has the benefit of more correctly sizing the permanent area (see -XX:PermSize on Sun JVMs) to the application meaning reduced heap expansion events during startup.

There are 2 alternative implementations available.

Write a class in Java which extends ClassLoader and reads in a binary

"permanent". This streamlines disk access but still employs the standard Java mechanisms for placing the classdata into the permanent area.

Amend the JVM itself (ie change java.exe) to stream the f...