Skip to content
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

Is interfacer supposed to be slow? #35

Open
OscarVanL opened this issue Jan 24, 2022 · 1 comment
Open

Is interfacer supposed to be slow? #35

OscarVanL opened this issue Jan 24, 2022 · 1 comment

Comments

@OscarVanL
Copy link

OscarVanL commented Jan 24, 2022

We have noticed that go generate takes awfully long since we started using interfacer. Compared to mockgen, interfacer seems to take several orders of magnitude longer to run per file.

Is this by design/unavoidable or is this a bug?

@rjeczalik
Copy link
Owner

Is this by design/unavoidable or is this a bug?

There are no optimization in the interfacer at all, like caching loaded packages etc. Definitely it can be improved performance-wise.

stgraham2000 pushed a commit to Ioka-Technologies/interfaces that referenced this issue Jun 19, 2023
Migrate from using the older `loader` package in golang
tools to the new `packages` package in golang tools.  The
previous `loader` package does not support modules and
after switching from `loader` to `packages` it modified
an execution that took over 10s to under 1s.
stgraham2000 added a commit to Ioka-Technologies/interfaces that referenced this issue Jun 19, 2023
…from_loader_to_packages

Fixes rjeczalik#35: Slow to generate interfaces
stgraham2000 pushed a commit to Ioka-Technologies/interfaces that referenced this issue Jun 21, 2023
Migrate from using the older `loader` package in golang
tools to the new `packages` package in golang tools.  The
previous `loader` package does not support modules and
after switching from `loader` to `packages` it modified
an execution that took over 10s to under 1s.
stgraham2000 added a commit to Ioka-Technologies/interfaces that referenced this issue Jun 21, 2023
…from_loader_to_packages

Fixes rjeczalik#35: Slow to generate interfaces
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants