How to Fix High CPU and Memory Usage in VS Code

Diagnose and fix high CPU or memory usage in VS Code. Covers the Process Explorer, extension profiling, file exclusions, AI feature settings, and renderer process troubleshooting.

7 min read

High CPU or memory usage in VS Code must be traced to the process using the resources. Start with Process Explorer, reproduce the spike, and then test only the matching cause.

The current workflow follows the official VS Code performance troubleshooting guide.

If resource usage is normal but the interface still stalls, use /vscode/vs-code-is-slow-lagging-or-freezing-how-to-make-it-faster to diagnose responsiveness and startup timing.

Identify the problem process

Open Help > Open Process Explorer. This window lists every VS Code process and its current CPU and memory usage. Watch it while VS Code is idle and while you are working normally.

The process name is a clue, not proof of the cause:

ProcessWhat to test next
Extension HostExtensions and an extension CPU profile
Window (Renderer)UI profiling and a GPU-disabled launch
Shared ProcessShared services, including file-system work

You can also run code --status from an external terminal while VS Code is running. It prints process and workspace diagnostics that you can attach to a performance report.

Fix high Extension Host CPU

Extensions run in an Extension Host process. If that process remains busy while you reproduce the issue, test the same workload with extensions disabled.

Find the specific extension

Run Help: Start Extension Bisect from the Command Palette. The tool disables groups of extensions and asks whether the problem remains after each reload.

Reproduce the same action and answer each prompt consistently. If usage returns to normal only while an extension is disabled, update or disable that extension using /vscode/how-to-install-disable-update-and-uninstall-vs-code-extensions.

Profile the extensions

For a more detailed view, run Developer: Show Running Extensions. This editor lists every active extension with controls to start and stop CPU profiling. Click the record button in the editor toolbar, reproduce the high CPU behavior, then stop the recording.

Save the profile and attach it when reporting the problem. The recording is diagnostic data, so review it before sharing outside your organization.

What to do after finding the extension

Once you identify an extension, check its Marketplace page for an update. If the issue remains, use Report Issue in the Running Extensions editor or the extension's support link.

Fix high Shared Process CPU

Large generated folders can increase file-system and search work. Test a smaller folder first; if usage drops, exclude only directories that your workflow does not need VS Code to watch.

The fix is to exclude directories that do not need to be watched. Add these to your settings:

jsonjson
{
  "files.watcherExclude": {
    "**/node_modules/**": true,
    "**/dist/**": true,
    "**/build/**": true
  }
}

Put this in workspace settings only when these paths contain generated or dependency files. Reload the window, repeat the same workload, and compare Process Explorer; remove the exclusions if they do not help.

Fix high Window (Renderer) CPU

The Window process handles the editor UI. If it spikes while typing, scrolling, or repainting, test VS Code once with GPU acceleration disabled.

bashbash
code --disable-gpu

If the same workload is normal in this test, update the graphics driver and report the renderer issue with the Process Explorer evidence. Do not make the flag permanent until you have confirmed the difference.

Test whether built-in AI is involved

If the spike starts with chat or inline suggestions and you do not need those features in this workspace, search Settings for Chat: Disable AI Features and enable chat.disableAIFeatures.

This hides VS Code's built-in AI features and disables the Copilot extensions. Reload the window and repeat the same action; if usage does not change, restore the setting and continue diagnosing other processes.

Test with a clean configuration

If the cause is still unclear, run Profiles: Create a Temporary Profile. This opens an empty, session-only profile without changing your existing profile.

Open the same folder, reproduce the issue, and check Process Explorer. Normal usage in the temporary profile points to a setting or extension in your regular profile; persistent usage points to the workspace, VS Code core, or the operating system.

Report a reproducible performance issue

Run Help > Report Issue, choose Performance Issue, and include the process name, reproduction steps, code --status output, and any saved CPU profile. Remove private paths or project information before submitting diagnostics.

Rune AI

Rune AI

Key Insights

  • Open Help > Open Process Explorer and reproduce the resource spike.
  • Use Extension Bisect when Extension Host remains busy.
  • Exclude only generated directories that do not need file watching.
  • Test --disable-gpu when the Window process spikes during rendering.
  • Use a Temporary Profile to separate configuration issues from workspace or core issues.
RunePowered by Rune AI

Frequently Asked Questions

How do I know which extension is using the most CPU?

Open Help > Open Process Explorer and check whether Extension Host is busy. Then run Developer: Show Running Extensions and record a CPU profile while reproducing the spike.

Can I set a memory limit for VS Code?

VS Code has no general memory-limit setting. Identify the busy process first, then reduce the extensions, files, or features responsible for the load.

Does disabling AI features reduce CPU and memory usage?

It can if built-in AI or Copilot is responsible. The chat.disableAIFeatures setting hides built-in AI features and disables the Copilot extensions, but it does not diagnose unrelated extensions or processes.

Conclusion

Use Process Explorer to identify the busy process before changing settings. Test extensions, workspace scope, rendering, and AI features separately, and confirm the result by reproducing the same workload.