@lqiu96 , @eaball35 , and I found that for certain Java repository, mvn javadoc:aggregate -P docFX (exact command is https://github.com/googleapis/java-aiplatform/blob/348c76afec3c2ee79861351d861c0dff33f194e0/.kokoro/release/publish_javadoc11.sh#L40) takes around 60 - 90 minutes to finish.
We're investigating the slowness. But if some of you know the cause of the slowness, that would be much appreciated.
Environment details
- Programming language: Java
- OS: Linux
- Language runtime version: Java 11
- Package version: 1.5.0 (but we also observed the same slowness in 1.6.0)
Steps to reproduce
Check Kokoro job "prod:cloud-devrel/client-libraries/java/java-aiplatform/release/publish_javadoc11".
OR
- Checkout https://github.com/googleapis/java-aiplatform
- Run
mvn -X javadoc:aggregate -P docFX. You see your program gets stuck at
[INFO] Configuration changed, re-generating javadoc.
[DEBUG] /usr/local/google/home/suztomo/.sdkman/candidates/java/11.0.12-open/bin/javadoc @options @argfile
(waiting for 60-90 minutes, then it succeeds)
Observation
ClassBuilder.buildFilesForInnerClasses is taking the most of the time.

Other observations:
- The heap usage was just fine; it's well below the maximum heap size configured.
top command showed the javadoc command hit 100% of one of the cores.
strace command didn't show any system calls being made while waiting. (I attached to the process and waited for 1 minutes).
lsof showed nothing suspicious; only ~50 files opened by the javadoc process.
Comparison to similar jobs in other language
- Java (
cloud-devrel/client-libraries/java/java-aiplatform/release/publish_javadoc11) takes 96 minutes.
- Python (
cloud-devrel/client-libraries/python/googleapis/python-aiplatform/docs/docs) takes 14 minutes.
- NodeJS (
cloud-devrel/client-libraries/nodejs/release/googleapis/nodejs-ai-platform/docs) takes 19 minutes.
Steps
@lqiu96 , @eaball35 , and I found that for certain Java repository,
mvn javadoc:aggregate -P docFX(exact command is https://github.com/googleapis/java-aiplatform/blob/348c76afec3c2ee79861351d861c0dff33f194e0/.kokoro/release/publish_javadoc11.sh#L40) takes around 60 - 90 minutes to finish.We're investigating the slowness. But if some of you know the cause of the slowness, that would be much appreciated.
Environment details
Steps to reproduce
Check Kokoro job "prod:cloud-devrel/client-libraries/java/java-aiplatform/release/publish_javadoc11".
OR
mvn -X javadoc:aggregate -P docFX. You see your program gets stuck at(waiting for 60-90 minutes, then it succeeds)
Observation
ClassBuilder.buildFilesForInnerClassesis taking the most of the time.Other observations:
topcommand showed the javadoc command hit 100% of one of the cores.stracecommand didn't show any system calls being made while waiting. (I attached to the process and waited for 1 minutes).lsofshowed nothing suspicious; only ~50 files opened by the javadoc process.Comparison to similar jobs in other language
cloud-devrel/client-libraries/java/java-aiplatform/release/publish_javadoc11) takes 96 minutes.cloud-devrel/client-libraries/python/googleapis/python-aiplatform/docs/docs) takes 14 minutes.cloud-devrel/client-libraries/nodejs/release/googleapis/nodejs-ai-platform/docs) takes 19 minutes.Steps
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005resulted inExit code: 1 - javadoc: error - invalid flag: -agentlib:jdwp=transport=dt_socket.mvn javadoc:aggregate-no-forkdoes fork javadoc command. The "no-fork" means no compilation.