---
title: "VS Code or Cursor using too much memory on a Mac · MacMelon"
description: "Language servers and extension hosts in VS Code and Cursor grow in long sessions. Restart them, exclude dependency folders from watching, or reopen the editor."
url: "https://macmelon.com/use-cases/vs-code-or-cursor-slowing-your-mac"
---

# When VS Code or Cursor slows your Mac

Code intelligence grows over long sessions, and every open project keeps its own helpers. Sentinely restarts language servers, adds watcher excludes, or reopens the editor.

VS Code and editors built on it, such as Cursor and Windsurf, run a [language server](https://macmelon.com/glossary/language-server) for code intelligence and an extension host for each open project window. Over a long session, language servers such as TypeScript's tsserver can grow large. Watching node\_modules, build, and cache folders adds background work too.

[Sentinely](https://macmelon.com/apps/sentinely) offers three fixes, from least to most disruptive: restart an oversized language server (the editor starts a fresh one), add watcher and search excludes for dependency folders to your editor settings, or quit and reopen the editor so every project gets fresh helpers.

## Steps

1.  ### Restart code intelligence

    If a language server is holding a lot of memory, Sentinely can stop it. The editor restarts it automatically. Autocomplete pauses for a few seconds. In VS Code you can do the same yourself with the command TypeScript: Restart TS Server.

2.  ### Stop watching dependency folders

    If your editor settings do not exclude node\_modules, build, and cache folders from file watching, Sentinely can add files.watcherExclude entries to your settings.json. It saves a backup next to the file first.

3.  ### Reopen the editor when many projects are open

    Each project window keeps its own helpers. When the editor as a whole is holding a lot across several windows, quitting and reopening it restores your windows with fresh helpers. Sentinely asks you to confirm this one.

4.  ### Read the receipt

    Language servers restart by design, so Sentinely measures the whole editor, not just the stopped process. That way the receipt does not count memory the fresh server uses again as freed.

## Before you start

-   Save your work before you quit and reopen the editor. Terminals and tasks running inside it restart.
-   Excluding a folder from watching means the editor will not notice changes inside it on its own. That is usually what you want for node\_modules and build output, but check before you exclude your own source folders.

## Questions

Which editors does this cover?

Visual Studio Code, VS Code Insiders, Cursor, and Windsurf.

Will it change my settings without asking?

No. Adding excludes is a fix you review and run. Sentinely saves a backup of settings.json next to the file before it writes.

## Apps

[No more Force Quit in the middle of a build. ### Sentinely](https://macmelon.com/apps/sentinely)

## Related guides

[### How to find what's slowing down your Mac](https://macmelon.com/guides/how-to-find-what-is-slowing-down-your-mac)

## Related use cases

[### Stop AI-tool helpers left running after you close your editor](https://macmelon.com/use-cases/stop-leftover-ai-helpers-and-mcp-servers)[### Delete node\_modules safely](https://macmelon.com/use-cases/delete-node-modules-safely)

## Related terms

[The background process that gives a code editor autocomplete, go-to-definition, and error checking for a language. ### Language server](https://macmelon.com/glossary/language-server)[The memory macOS charges to a process, including memory it has compressed. Sentinely's unit for estimates and receipts. ### Memory footprint](https://macmelon.com/glossary/memory-footprint)[The folder where a JavaScript project keeps its installed dependencies. ### node\_modules](https://macmelon.com/glossary/node-modules)[Sentinely's record of a fix: what was freed and what changed for you, measured after the fix rather than promised before it. ### Measured receipt](https://macmelon.com/glossary/measured-receipt)
