Skip to content

Commit a7effd4

Browse files
committed
RAM disk FAQ: clarify no perf benefit, add disable-cache tip; keep OS examples
1 parent 01c86ca commit a7effd4

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

docs/cpp/faq-cpp.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,19 @@ Yes. The C/C++ extension lets you relocate and limit the IntelliSense cache:
9090
- **`C_Cpp.intelliSenseCachePath`** — where the `ipch` cache is stored
9191
- **`C_Cpp.intelliSenseCacheSize`** — maximum cache size in MB (set to `0` to disable)
9292

93-
By default, the cache lives under your user cache directory (Windows: `%LocalAppData%/Microsoft/vscode-cpptools`, Linux: `$XDG_CACHE_HOME/vscode-cpptools/` or `~/.cache/vscode-cpptools/`, macOS: `~/Library/Caches/vscode-cpptools/`). If you want to minimize SSD writes and speed up access, you can mount a RAM-backed filesystem and point the cache there.
93+
By default, the cache lives under your user cache directory (Windows: `%LocalAppData%/Microsoft/vscode-cpptools`, Linux: `$XDG_CACHE_HOME/vscode-cpptools/` or `~/.cache/vscode-cpptools/`, macOS: `~/Library/Caches/vscode-cpptools/`). If you want to minimize SSD writes, you can mount a RAM-backed filesystem and point the cache there.
94+
However, using a RAM disk does not generally improve IntelliSense performance and may increase memory usage, since the cache files are already memory-mapped by the IntelliSense processes.
9495

9596
> **Notes**
9697
> - A RAM disk is volatile. The cache will be cleared on reboot/unmount (the cache will rebuild automatically).
9798
> - Set `C_Cpp.intelliSenseCacheSize` ≤ your RAM disk size.
9899
> - This is a per-user setting and works across all workspaces.
100+
> - If your main concern is reducing disk writes (e.g., SSD wear), you can also set `"C_Cpp.intelliSenseCacheSize": 0` to completely disable the cache instead of relocating it.
101+
102+
> **Related:** The tag parser “browse” database path can be customized with
103+
> `"C_Cpp.default.browse.databaseFilename"`. Moving it to a RAM disk is generally not recommended for performance, but the path can be changed if needed.
104+
105+
99106

100107
**macOS (APFS RAM disk, ~4 GB):**
101108
```bash

0 commit comments

Comments
 (0)