title: Why is Golang Intellisense slow in VS Code when changing imports?
body: <p>I have the <code>ms-vscode.go</code> Go extension installed in my VS Code setup and am using the <code>gopls</code> language server.  The language server seems to perform well with Intellisense operations except when I am editing imports, at which point there is considerable lag as every edit to the import takes several seconds to update.</p>
  <p>For example, the following is a replay of typing in manually <code>import &quot;net/http&quot;</code> letter-by-letter (rather than copy/paste).  The clip runs at 20x speed, so it takes about 1.8 minutes from when I stop typing the import statement to when the language server gets to the correct error of <code>&quot;net/http&quot; imported but not used</code>:</p>
  <p><a href="https://i.stack.imgur.com/20Um0.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/20Um0.gif" alt="enter image description here" /></a></p>
  <p>Am I doing something wrong?</p>
  <p>My go-related settings:</p>
  <pre><code>  &quot;go.useLanguageServer&quot;: true,
    &quot;go.alternateTools&quot;: {
        &quot;go-langserver&quot;: &quot;gopls&quot;
    },
  </code></pre>
  <p>Output from <code>gopls</code> reveals that much time is spent in <code>go list</code>:</p>
  <pre class="lang-none prettyprint-override"><code>4.037297s for ...go &quot;list&quot; &quot;-e&quot; &quot;-json&quot; &quot;-compiled=true&quot; &quot;-test=true&quot; &quot;-export=false&quot; &quot;-deps=true&quot; &quot;-find=false&quot; &quot;--&quot; ...
  </code></pre>
  <p>for every change.</p>