Future plans for AppCDS?
David Holmes
david.holmes at oracle.com
Wed Aug 5 00:28:00 UTC 2015
Hi Mike,
On 5/08/2015 4:23 AM, Mike Hearn wrote:
> Hi there,
>
> I'm wondering if there are any plans to extend AppCDS in future to include
> serializing the code cache to disk?
The are no existing Projects or JEPs in this area.
Cheers,
David
------
> I ask because I have a (not very complicated) desktop JavaFX app. It starts
> in about three seconds, which isn't terrible, but I'd like it to be faster.
>
> Unfortunately I am frequently frustrated in this goal. Some testing shows
> that one step of the initialisation sequence takes about a second normally.
> If I put it in a loop to let it fully compile, that drops to more like a
> quarter of a second.
>
> Likewise, my app loads a series of items to display them on the screen. The
> first one can take a solid 700-800 msec. The rest are more like 10% of that.
>
> I tried parallelising some of the things done during startup, but it made
> no difference. My theory is that the compile threads are taking up the
> spare cores that could be doing startup tasks (it's a bit hard to profile
> this though as the whole sequence only lasts a few seconds).
>
> AppCDS already knows how to serialise lots of HotSpot state to disk for
> unchanging JARs. If it could store compiled method code as well, then I
> could probably shave a second or two off app startup.
>
> I do understand that this situation is a bit rare for Java developers and
> that due to extra disk IO etc, loading compiled code from disk might not
> always be faster. But for devices that have an SSD it probably can be,
> especially if HotSpot were to do the same trick Microsoft does and lay out
> compiled methods on disk in the order they will be used.
>
More information about the hotspot-runtime-dev
mailing list