Skip to content

Use worker threads or child processes to run api-extractor in parallel for multiple entry points #412

@me4502

Description

@me4502

Description

api-extractor is slow, and with multiple entry points this problem is compounded. Currently, the code that runs this uses a Promise pool to parallelise the process, however due to API-Extractor being synchronous this still results in the actual calls running one by one.

Suggested solution

To actually parallelise the api-extractor calls, a worker thread or child process model could be implemented instead. Due to the isolated nature of these calls and the simple data being passed back and forth, worker threads appear to be a good candidate from quick inspection.

This would allow the API Extractor processes to actually run in parallel, allowing for significant speed ups of the type rollup process.

Alternative

No response

Additional context

No response

Validations

  • Read the FAQ.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions