Skip to content

mvn javadoc:aggregate -P docFX takes 90 minutes #126

@suztomo

Description

@suztomo

@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

  1. Checkout https://github.com/googleapis/java-aiplatform
  2. 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.

image

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions