using modules for caching
forax at univ-mlv.fr
Wed Dec 2 19:30:03 UTC 2015
----- Mail original -----
> De: "Peter Levart" <peter.levart at gmail.com>
> À: "Jochen Theodorou" <blackdrag at gmx.org>, jigsaw-dev at openjdk.java.net
> Envoyé: Mercredi 2 Décembre 2015 17:45:59
> Objet: Re: using modules for caching
> On 12/02/2015 01:40 PM, Jochen Theodorou wrote:
> > Hi,
> > I was wondering if it will be possible to reuse module information between
> > runs.. Currently I am collecting a lot of reflective information and use
> > it to build a meta class system, which I then need to do method
> > invocations, what fields are available and other things like that. Since
> > that can take a while I was wondering if it is possible to cache this
> > information which made me wonder if there is something that allows me to
> > interact with modules to know if their composition has changed compared to
> > the last run. For example that all classes in module X are still the same.
> > I was thinking that the JVM itself would use this kind of information for
> > runtime images, thus maybe there are ways to get this kind of information?
> > bye Jochen
> An idea:
> You collect this information and generate a special module from it. Then
> you build a runtime image composed of modules of original image and that
> additional module. This could be performed by a special variant of jlink
> - a glink!
You don't need to collect something before calling jlink,
jlink has a system of backends that you can plug to analyze the runtime image and produce what you want
(as far as i know the interface of a backend is not settle).
Trying to do analysis like this at compile time is maybe not a good idea because modules can change between compile time and install time.
More information about the jigsaw-dev