Skip to content

fix: avoid double loading of source package #106

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 9, 2025

Conversation

3vilhamster
Copy link
Contributor

Hey.
Thank you for the super helpful package.
We are heavily using it in github.com/cadence-workflow/cadence for wrapper generations. One thing though, in our case it is a bit slow.
I was investigating possibilities - and found that sourcePackage is read 2 times:

  1. inside getOptions() function
  2. inside NewGenerator consructor

Removing this double loading saves around 10% of the execution time.

This should be a noop for other cases.

@hexdigest hexdigest merged commit 024620b into hexdigest:master May 9, 2025
1 check failed
@hexdigest
Copy link
Owner

Hi @3vilhamster! This is a good one, thanks!

@3vilhamster 3vilhamster deleted the avoid-double-read branch May 9, 2025 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants