Faster incremental OpenJDK compilation

Tagir Valeev amaembo at gmail.com
Wed May 6 16:05:47 UTC 2020


Hello!

I think you are missing the dependencies that are changing the generated
> code,
> - in a switch, javac generates a different code depending on the order of
> the enum constants,
> - static final are inlined in the code,
> - for valhalla, changing a class to an inline class or vice versa change
> all the method/field descriptors
>
> and i'm sure there are more ...
>

I think changing the annotation retention policy affects the compilation of
every use site of that annotation. Changing target (e.g. adding or removing
TYPE_USE) may also change the generated code for the use sites.


> >
> > For a simple "touch Object.java && make", the wall-clock time is less
> > then 5s, which sounds interesting:
> > ---
> > $ touch src/java.base/share/classes/java/lang/Object.java && time make
> > Building target 'default (exploded-image)' in configuration
> > 'linux-x86_64-server-release'
> > Compiling 3028 files for java.base
> > Stopping sjavac server
> > Finished building target 'default (exploded-image)' in configuration
> > 'linux-x86_64-server-release'
> >
> > real    0m3,104s
> > user    0m5,731s
> > sys     0m1,086s
> > ---
> >
> > My current prototype is in the jdk/sandbox repository, branch
> > "jlahoda-depend-in-module":
> > http://hg.openjdk.java.net/jdk/sandbox/shortlog/jlahoda-depend-in-module
> >
> > I wonder if this would sound interesting to developers working on base
> > modules, like java.base.
> >
> > What do you think? Any ideas/feedback?
> >
> > Thanks,
> >       Jan
>
> Rémi
>


More information about the ide-support-dev mailing list