[SOLVED] Compilation very slow, especially for debug

已完成

Compilation in GoLand 2021.1 is very slow in general, but it is really slow when trying to debug. Sometimes it takes a moment, sometimes 10 minutes and I give up.

A similar issue was posted in SO: https://stackoverflow.com/questions/46838322/goland-is-slow-to-launch-a-debug-application but the solution does not work.

A build of the same project from the command line is very quick (relatively to GoLand at least)

 

0

Hi,

Could you please upload IDE logs to https://uploads.jetbrains.com/ and provide its ID?

Does it happen on some kind of open-source project? Could you please provide a link?

Thanks.

0

Hello @...

I tried to update the zip file generated from Help → Collect Logs ... but the upload failed. I uploaded to Upload id: 2021_04_23_LQZbsTNhBsuRoHXC (files: idea_updater.log and 2 more) the four files in the root dir of the zip, please let me know if you need anything else.

This is indeed an open-source project that I hope to finish today, I will update this question with the GitHub link. You can try on the half-baked solution so far (which builds fine, but I had to build from the command line as the IDE did not want to end). They are loaded at Upload id: 2021_04_23_UcpBjTuF2rvnLbZA (files: go.mod, web.go)

Please let me know if I can help - the IDE is fantastic for Go development (that I am just starting with) but borderline unusable as I have to try to compile several times so that the build ends in a reasonable time.

0

Hi,

I tried to reproduce the issue locally. It compiles ~3-5 seconds for debugging.

Are you using anti-virus or built-in Windows Defender? If so, add project and IDE folders to exclusions, please see Antivirus Impact on Build Speed and add the following directories:

  • C:\Users\Username\AppData\Roaming\JetBrains\GoLand2021.1
  • C:\Users\Username\AppData\Local\JetBrains\GoLand2021.1
  • Directory of your project
  • Delve executable: C:\Program Files\JetBrains\GoLand 2021.1\plugins\go\lib\dlv\windows\dlv.exe
  • Temporary directory where's your binaries executed (C:\Users\Username\AppData\Local\Temp) or use -o build flag instead (recommended)

Also, probably, your project is located at some cloud directory like Google Drive with auto-synchronization. It impacts build speed sometimes too, and I suggest move your project to a local disk without synchronization to see if it helps.

1

@...: I uninstalled the AV to test this and, behold, the compilation time was so quick that I thought there was a problem :)

Thank you for the suggestion!

0

I had the same problem for many months (up to 10 minutes to compile a simple test).  After finding this, I turned off BitDefender and compiles are instant.

0

请先登录再写评论。