Skip to content

[ Performance Improvement] Optimize generate Command Execution Speed #1703

@Tanmay-008

Description

@Tanmay-008

Why do we need this improvement?

The asyncapi generate command takes significantly longer to execute, especially on the first run. Benchmarking shows that the first execution can take up to 58 seconds, while subsequent runs are much faster (~4-10s). This suggests potential inefficiencies in caching, dependency resolution, and processing.

How will this change help?

Reduce execution time for generate command, improving usability.
Improve caching strategies to prevent slow first-run execution.
Enhance dependency management for a more optimized installation.
Potential migration to Bun or pnpm to speed up package res

Screenshots

Image

How could it be implemented/designed?

✅ Profile command execution: Identify slow areas using benchmarking tools like Hyperfine.
✅ Optimize AsyncAPI processing: Investigate parallel execution, lazy loading, or caching.
✅ Improve dependency management: Reduce redundant dependencies & optimize imports.
✅ Explore Bun/pnpm migration: Evaluate if switching from npm to Bun or pnpm improves performance.

🚧 Breaking changes

No

👀 Have you checked for similar open issues?

  • I checked and didn't find a similar issue

🏢 Have you read the Contributing Guidelines?

Are you willing to work on this issue?

Yes I am willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestgsocThis label shoudl be used for issues or discussions related to ideas for Google Summer of Codestale

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions