I am building a Javadoc for a module with 2,509 classes. This currently takes 7 min or 6 files per second.
I have tried
mvn -T 1C install
However javadoc
only uses 1 CPU. Is there a way to use more and/or speed up?
I am using Oracle JDK 8 update 112. My dev machine has 16 cores and 128 GB of memory.
Running flight recorder I can see that there is only one thread main
For those who are interested, I've used the following options:
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<additionalJOptions>
<additionalJOption>-J-XX:+UnlockCommercialFeatures</additionalJOption>
<additionalJOption>-J-XX:+FlightRecorder</additionalJOption>
<additionalJOption>-J-XX:StartFlightRecording=name=test,filename=/tmp/myrecording-50.jfr,dumponexit=true</additionalJOption>
<additionalJOption>-J-XX:FlightRecorderOptions=loglevel=debug</additionalJOption>
</additionalJOptions>
</configuration>
</plugin>
NOTE: One workaround is to do:
-Dmaven.javadoc.skip=true
3.7% us, 0.2 sy, 0.0 ni, 96.3 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st.
– Shannanshannenjava
package. Took 35 seconds so something seems off about your times. – Leaseholdjavac
compiler is not multithreaded, but the Eclipse compiler is. Can the Eclipse compiler perhaps generate javadoc too? – Haemostaticmvn -T 16 install
behave differently? – Daveta-T
controls how maven startsjavac
compiler processes,javadoc
is a standalone tool. There are very few options documented, for example-verbose
will tell you how long it's spending on each file. – Davetajavadoc
throughmvn
, so a maven speed-up may be worth a shot, i.e.,export MAVEN_OPTS="-client -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -Xverify:none"
(cf. this blog). I don't have too much hope about that, but who knows? – Abloommvn javadoc:javadoc
? – ForetasteJMH
- 3618 of classes, around 12 seconds. I'm running3.0.1
version of the plugin. – Foretasteopenjdk
and our 10 of internals ones - some modules, all much above 2k classes... it's most probably the data itself in your project that triggers a weird path. plz post back with results once you do – Foretaste