You might have noticed that on the first launch after a system reboot (cold start), Java applications take longer to start than on subsequent launches (warm start). And even at their fastest, Java applications still take longer to start than similar native applications.
Excelsior JET, a compliant Java SE 7 implementation (JVM) with an Ahead-Of-Time compiler and deployment toolkit, optimizes Java startup overhead:
- Pre-compilation to native code provides quick warm starts
- Load-time I/O optimizations minimize cold startup times
In either case, you may expect your optimized Java application to start twice as fast.
Want to give it a try? Download a free trial
Java vs Native vs Optimized Java
The following startup time comparison includes different RSS feed readers: two native Windows applications (Feed-Demon and FeedReader) and one implemented in Java (RSSOwl). The latter was run on the standard JRE 1.6.0_20 and then compiled with Excelsior JET 7.2 Professional Edition/profile 1.6.0_20.
These applications were run on a low-range laptop (dual-core ULV Intel Celeron SU2300, 2GB RAM), and their warm and cold startup times measured as the time to fully display the main window.
As you can see, the RSSOwl application optimized with Excelsior JET starts:
- 2x to 3x faster than on the JRE
- almost as fast as the similar native applications
- How it works?
Excelsior JET uses Ahead-Of-Time pre-compilation of Java bytecode to create optimized native code, making your Java applications run directly on hardware from the very start. This removes JVM bootstrap overhead such as interpretation and JIT compilation.
In addition, Excelsior JET includes the Startup Optimization Toolkit, enabling you to use profile-guided I/O optimizations prior to application deployment. These optimizations reduce the number of disk reads at application load and make access to the executable close to sequential, thus improving cold startup times.
For more details, see the "Startup time optimization" chapter in Excelsior JET User's Guide.
- How to use it?
- When it cannot help?
Some applications perform time-consuming actions on startup, such as opening a network connection. For these applications, the startup time is not bound to Java code execution nor to loading the application files from disk. As a result, the optimizations offered by Excelsior JET may only have a minor impact on the overall startup time of such applications.
For applications that run off a USB Flash Drive or Solid State Drive, the effect of the startup time optimization is smaller compared to traditional hard drives. However, you may still expect a 1.5x startup time improvement for these applications.
Note: To achieve the maximum effect of startup optimization, follow the recommendations from the section "How to further reduce the startup time" of this Excelsior JET Knowledge Base article.