Paul Krill
Editor at Large

Project Leyden set to bring faster startups to Java

news
May 23, 20222 mins

Green-lit Project Leyden will work to mitigate slow startup and performance issues by introducing static images to the Java platform.

speed fast race car shutterstock 1168856884
Credit: Jamesboy Nuchaikong / Shutterstock

A simmering proposal to address Java pain points, including slow startup, slow time to peak performance, and large footprint, is now moving forward.

Project Leyden, under discussion for more than two years, will address these pain points by introducing static images to the JDK and the Java platform. In an OpenJDK post on May 20, Mark Reinhold, chief architect of the Java platform group at Oracle, decreed it was time for the project to begin.

A static image is a standalone program, derived from an application, that runs that application and no other. The static image serves as a closed world with respect to classes it can load. At runtime, it cannot load classes from outside the image, nor can it create classes dynamically. The closed-world constraint strictly limits Java’s natural dynamism, particularly on runtime reflection and class-loading features, on which many existing Java frameworks and libraries depend.

Not all applications are well-suited to this constraint and not all developers are willing to live with it, Reinhold said. Rather than adopt the closed-world constraint from the start, Reinhold proposed a gradual, incremental approach, exploring a spectrum of constraints. The resulting optimizations will likely be weaker than the closed-world constraint. But the optimizations should be applicable to a broader range of existing code.

In the long run, developers on the project will likely embrace the full closed-world constraint in order to produce fully static images. The effort will lean heavily on existing components of the JDK, including the HotSpot JVM, C2 compiler, application class-data sharing, and the jlink code tool.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author