Diagnosing and Fixing GoLand Indexing Stalls and High CPU Usage
A step‑by‑step diagnostic guide for GoLand indexing stalls: identify the offending thread, exclude vendor/build directories, tune JVM heap, handle symlinked caches, and know when to escalate to JetBrains Support.
07 Sept 2026, 04:49 UTC

Recognizable Condition
GoLand becomes sluggish or unresponsive during the "Indexing" phase after opening a large project or pulling fresh changes. The Background Tasks progress bar (bottom‑right status bar) lingers at "Indexing…" for minutes, while the IDE process spikes to 100 % CPU on one or more cores. In the Activity Monitor (Help → Diagnostic Tools → Activity Monitor) you see a thread named com.intellij.util.indexing.FileBasedIndexImpl or com.goide.indexing.GoIndexer consuming the majority of cycles.
Cause and Diagnostic Quick‑Reference
| Observed Symptom | Most Likely Cause | Where to Verify |
|---|---|---|
| Indexing never finishes; CPU stays high | Large non‑source directories (vendor, build output, generated protobufs, node_modules) are being scanned | Project tool window → right‑click suspect folder → Mark Directory as → check if Excluded is available |
| Indexing completes but IDE freezes repeatedly | JVM heap (-Xmx) too small for the project size; frequent full GC pauses | Help → Change Memory Settings → note current Maximum Heap Size |
CPU spikes only on first open after git pull | VCS refresh triggers a full re‑index of changed modules | Version Control → Log → check number of modified files since last open |
High CPU but vendor/ already excluded | Symlinked directories or nested go.work modules pulling in external paths | Settings → Build, Execution, Deployment → Go Modules → inspect Vendor directory and Work mode settings |
Ordered Diagnostic Checks
- Identify the indexing thread. Open Help → Diagnostic Tools → Activity Monitor. Sort by CPU. Note the top thread name and the file paths it logs (click the thread to see recent stack traces).
- List directories currently marked Excluded. In the Project view, press Alt+1, then type
excludedin the filter box. Any high‑volume folder missing from this list is a candidate. - Measure current heap pressure. In Help → Change Memory Settings note the Maximum Heap Size. If it is ≤ 2 GB on a project with > 50 k source files, the heap is likely undersized.
- Check for symlinks or
go.workincludes. Runfind . -type l -name "*vendor*" -o -name "*build*" -o -name "*dist*" 2>/dev/null | head -20in the project root (terminal, no special permissions). Symlinked vendor trees bypass the Excluded mark on the target. - Confirm VCS scope. Open Git → Show History for the project root. If the last pull touched > 5 k files, a full re‑index is expected; the fix is to wait or exclude generated files before pulling.
Fixes Tied to Findings
Fix 1: Exclude High‑Volume Non‑Source Directories
Right‑click each offending folder in the Project tool window → Mark Directory as → Excluded. Typical candidates:
vendor/(when using Go modules withgo mod vendor)bin/,build/,dist/,out/.git/(already excluded by default, but verify)- Generated code folders:
pbgo/,gen/,mock/ - Frontend assets if the repo is polyglot:
node_modules/,.next/,dist/
Risk: Excluded directories are invisible to Go to Definition, Find Usages, and Find in Files. If you need navigation into generated protobuf stubs, exclude only the .pb.go output folder, not the .proto sources.
Fix 2: Increase JVM Heap to Reduce GC Thrashing
Open Help → Change Memory Settings. Raise Maximum Heap Size in 1 GB increments (e.g., 2 GB → 3 GB → 4 GB). Click Save and Restart.
Guideline: Set heap to ≤ 50 % of physical RAM. On a 16 GB machine, 4–6 GB is safe; on 8 GB, cap at 3 GB to avoid OS swapping.
Verification: After restart, reopen Activity Monitor. The GC thread should appear occasionally (every 30–60 s) rather than continuously.
Fix 3: Handle Symlinked Vendor Trees
If find revealed symlinks pointing to a shared vendor cache, exclude the link target instead of the link itself:
# Example: project links ./vendor -> /opt/shared/go-mod-cache/vendor
# In GoLand: right-click /opt/shared/go-mod-cache/vendor → Mark Directory as → Excluded
Alternatively, disable Settings → Build, Execution, Deployment → Go Modules → Use vendoring if the project compiles without the vendor directory.
Fix 4: Limit VCS‑Triggered Re‑Indexing
For monorepos where a single git pull touches many unrelated modules, enable Settings → Version Control → Confirmation → Do not show "Files were loaded from VCS" dialog and consider splitting the project into multiple GoLand windows (one per logical module) using File → Open → .
Escalation Criteria
Escalate to JetBrains Support (or file a YouTrack issue) when all of the following are true:
- Heap is set to ≥ 50 % of physical RAM and GC pauses remain > 2 s (visible in Activity Monitor).
- All generated, vendor, and build directories are excluded; symlinks resolved.
- Indexing still exceeds 10 minutes on a project with < 100 k source files.
- Thread dumps (Help → Diagnostic Tools → Capture Thread Dump) show the indexer stuck in
com.intellij.util.indexing.FileBasedIndexImpl#processDirtyFileswithout progress for > 5 minutes.
Attach the thread dump, idea.log (Help → Collect Logs and Diagnostic Data), and a screenshot of the Activity Monitor to the ticket.
Verification Checklist After Applying Fixes
- Restart GoLand. Open the project. Note the time until the Background Tasks bar disappears.
- Open Activity Monitor. CPU should settle below 20 % on idle within 2 minutes.
- Press Ctrl+Shift+N (Navigate → File) and search for a known source file in a non‑excluded package. Navigation must work instantly.
- Run Edit → Find → Find in Files across the project root. Results should exclude the marked directories and complete in seconds.
- If using Go modules, run
go build ./...in the embedded terminal (Alt+F12) to confirm the excluded paths are not required for compilation.
Limitations
- Excluding directories is per‑project; shared vendor caches used by multiple projects must be excluded in each IDE instance.
- Heap increases apply to the entire JVM; other plugins (Docker, Database, Kubernetes) share the same pool.
- GoLand 2024.2+ indexes Go workspaces (
go.work) recursively; excluding a module directory in the workspace does not stop the indexer from scanning itsvendor/unless that module is also removed fromgo.work.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.