Closed wirekang closed 2 years ago
Can you be more specific? What is slow exactly? can you provide any example? It was always instantaneous.
I make batch file that calls ifacemaker
10 times, target files are about 500 lines in total. In my i5-9400 cpu, whole operation takes 20 seconds.
Entire project(not mine, I can't open it to public) is about 2,000 lines.
Is 20sec is normal? Is there any solution to extract multiple interfaces in a call?
I found the bottleneck!!! FormatCode
takes up 99% of the running times in my environment. I don't know why. Please check #51
@wirekang 20 seconds is definitely too slow for some reason it has to be on milliseconds level. Looking at your output it looks like you are running it all on windows, it might be a cause. Do you have external dependencies? Do you run AV?
@wirekang I updated formatter to the latest one, try again.
Same as before. I don't use anti-virus except Windows 10 default. Target code have many external dependencies.
@wirekang Do you use goimports tool?
@wirekang Do you use goimports tool?
Yes, and I'm using goimports instead of imports because of this issue.
interesting, ifacemaker depends on goimports and technically uses it to format the code.
interesting, ifacemaker depends on goimports and technically uses it to format the code.
I just knew that goimports
using imports
internally...
goimports does a lot more than that. It removes unused imports, adds missing imports, etc. This is the whole point of using it. You can't just disable it via options.
I understand. I just closed #51
@wirekang I updated formatter to the latest one, try again.
Sorry for confusing you. go install ...@latest
command treat latest tagged version as latest version. After I install latest commit version via go install github.com/vburenin/ifacemaker@640e39d
, The problem has been solved. Release new version please. I sincerely apologize for not thinking about it.
Is there any solution to speed up ifacemaker? (or alternative package)