rjeczalik / interfaces

Code generation tools for Go.
MIT License
420 stars 31 forks source link

Is interfacer supposed to be slow? #35

Open OscarVanL opened 2 years ago

OscarVanL commented 2 years ago

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 commented 2 years ago

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.