Skip to content

docs generator runs JSDoc once per API directory #3957

Description

@ShiroKSH

Summary

src/generator/docs.ts starts the same JSDoc command once for every API directory, but the directory name is not passed to JSDoc.

.jsdoc.js recursively reads build/src and writes to the shared docs/ destination, so each invocation regenerates the full documentation tree.

Impact

On current main, there are 331 API directories. npm run docs therefore starts 331 identical JSDoc jobs, with up to ten writing to the same output directory concurrently. This adds substantial runtime and memory pressure and can produce nondeterministic output.

Proposed fix

Keep building the API index, then invoke JSDoc once for the complete built source tree.

Reproduction

Run npm run docs and observe that the JSDoc command is scheduled once per API directory even though each invocation has identical arguments and configuration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions