Closed dyxushuai closed 9 years ago
Hi @JohnSmithX
I'm using sublime 3083 at Mac OS X, too. And I guess it's not godef cause the high cpu usage, it is goimports.
Check you gosublime config and change the fmt_cmd to gofmt like this:
"fmt_cmd": ["gofmt"],
// "fmt_cmd": ["goimports"],
After I don't use goimports, the CPU is low and godef plugin is stall work well.
But I'm not sure about this. If you only use godef plugin and the CPU is still high. That will prove godef plugin has some problem and tell me more details.
@buaazp I have a golang file with 500 lines.Then if this file is activated, CPU up. Other smaller files are normally.
@buaazp I think GoSublime cause this problem
@buaazp same problem [https://github.com/DisposaBoy/GoSublime/issues/201]
Agree with you. When I use gosublime to edit huge project like etcd (more than 100,000 lines code), there will be some lags.
gofmt
is not the same as goimports
using gofmt
avoid the cpu going to 100%, but you loose the auto import of libraries when saving
sublime build 3083 packages: SideBarEnhancements, GoSublime, Godef
when I install godef then sublime was keeping 50% cpu useage