VS Code Is Slow, Lagging, or Freezing: How to Make It Faster

Fix a slow, lagging, or freezing VS Code editor. Covers extension troubleshooting, file exclusion, GPU settings, workspace optimization, and startup performance improvements.

7 min read

If VS Code is slow, lagging, or freezing, identify the busy process before changing settings. Common causes include an extension, a large workspace, slow startup work, or rendering.

This guide covers the fixes in order from quickest to most thorough. After each fix, test whether VS Code feels responsive again before moving to the next step.

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

Find the problem with Process Explorer

Before guessing, see what is actually using resources. Open Help > Open Process Explorer. This window shows every VS Code process and its CPU and memory usage in real time.

The processes to watch are:

ProcessWhat it does
Extension HostRuns extensions. Sustained activity means extensions should be tested.
Window (Renderer)Handles the editor UI. Activity during typing or scrolling suggests a UI profile is useful.
Shared ProcessRuns shared services. Compare smaller and larger folders to narrow the trigger.

Keep the Process Explorer open while you reproduce the slowdown. Note which process spikes, then jump to the matching section below.

If the main symptom is sustained CPU or memory use, follow /vscode/how-to-fix-high-cpu-and-memory-usage-in-vs-code for process-specific profiling.

If the Extension Host process is consuming high CPU or memory, one of your extensions is the culprit.

Use Extension Bisect

The fastest way to find the problem extension is the built-in bisect tool. Open the Command Palette and run Help: Start Extension Bisect. VS Code disables half your extensions, reloads the window, and asks if the problem is gone. Answer yes or no, and it narrows the list until one extension is identified.

This process takes a few minutes and works even when you have dozens of extensions installed.

Disable all extensions as a quick test

If you want a faster confirmation that extensions are the problem, close VS Code and restart it with the --disable-extensions flag:

bashbash
code --disable-extensions

If VS Code runs smoothly without extensions, the cause is confirmed. You can then use Extension Bisect or manually re-enable extensions in small groups to find the problematic one.

Once you identify the extension, report the issue through its Marketplace page. You can also open Developer: Show Running Extensions and use the Report Issue button next to the extension.

If the Shared Process shows high usage, VS Code is spending too much time watching files. This happens in projects with large node_modules folders, build outputs, or monorepos with thousands of files.

Add exclusions only for generated directories that your project does not need VS Code to watch:

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

Reload the window and repeat the same action. Keep the exclusions only if Process Explorer and responsiveness improve; excluding a folder also means VS Code will not react to file changes there.

Fix GPU and rendering lag

If typing feels delayed, scrolling stutters, or the entire window freezes briefly, try disabling GPU hardware acceleration.

Disable GPU acceleration

Close VS Code and restart it with the --disable-gpu flag:

bashbash
code --disable-gpu

If the same action is smooth after this, update the graphics driver and retest normal startup. Treat the flag as a diagnostic until the difference is repeatable.

Clear the GPU cache

A corrupted GPU cache can cause rendering problems after an update. Close VS Code, rename GPUCache to GPUCache.backup, and restart:

  • Windows: %APPDATA%\Code\GPUCache
  • macOS: ~/Library/Application Support/Code/GPUCache
  • Linux: ~/.config/Code/GPUCache

VS Code creates a fresh cache. If performance does not improve, close VS Code, remove the new cache, and restore the backup.

If the window is completely blank

A blank window is a different GPU symptom. Preserve the cache as described above, then start VS Code with the --disable-gpu flag. If this fixes it, capture the result before making a permanent launcher change.

Fix slow startup

If VS Code takes a long time to open, run Developer: Startup Performance from the Command Palette. This opens a report with startup timing details.

Common causes and fixes:

  • Slow shell environment resolution: If your shell startup scripts run slow commands during initialization, it delays VS Code startup. Launch VS Code from an already-open terminal to skip this phase, or speed up your shell initialization scripts.
  • Many extensions loading at startup: Each extension adds startup time. Disable extensions you rarely use. See disable or uninstall extensions for more details.
  • Large workspace restore: If VS Code restores many open files and terminal sessions, it can feel slow. Close your folder before quitting to start fresh next time.

Reduce VS Code to a clean state

If nothing else works, test VS Code with a clean configuration.

Run Profiles: Create a Temporary Profile instead of clearing your settings. The temporary profile starts empty and is deleted when the VS Code session closes.

Open the same folder and repeat the slowdown. If the temporary profile is responsive, return to your normal profile and use Extension Bisect or reset modified settings one at a time. If it is still slow, the workspace or VS Code core remains in scope.

Rune AI

Rune AI

Key Insights

  • Run Help: Start Extension Bisect to find the extension causing the slowdown.
  • Add large directories to files.watcherExclude, files.exclude, and search.exclude.
  • Disable GPU acceleration with --disable-gpu if scrolling or typing lags.
  • Use Help > Open Process Explorer to identify which process is consuming resources.
  • Check the Startup Performance report if VS Code is slow to open.
RunePowered by Rune AI

Frequently Asked Questions

Why does VS Code slow down when I open a large folder?

VS Code searches the folder for project files and watches changes. Test a smaller folder, then exclude only generated directories that VS Code does not need to search or watch.

Can AI features make VS Code slower?

They can contribute to activity, but confirm this instead of assuming it. Temporarily enable chat.disableAIFeatures, repeat the same workload, and restore it if performance does not change.

What should I do if VS Code is slow after an update?

Test with extensions disabled and inspect Developer: Startup Performance. For rendering problems, test --disable-gpu and preserve the existing GPU cache before replacing it.

Conclusion

Most VS Code slowdowns come from extensions or large workspaces. Start with the Extension Bisect tool to find problematic extensions, then exclude large folders from file watching and search. Disable GPU acceleration if you see scroll or rendering lag, and check the Startup Performance report if VS Code takes too long to open.