Change:
<ins> /*--------------------------------------------------------------------------------------------- *  Copyright (c) Microsoft Corporation. All rights reserved. *  Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ declare module 'vscode-nsfw' { interface NsfwWatcher { start(): any; stop(): any; } interface NsfwWatchingPromise { then(): void; } interface NsfwStartWatchingPromise { then(fn: (watcher: NsfwWatcher) => void): NsfwWatchingPromise; } interface NsfwEvent { action: number; directory: string; file?: string; newFile?: string; oldFile?: string; } interface NsfwFunction { (dir: string, eventHandler: (events: NsfwEvent[]) => void, options?: any): NsfwStartWatchingPromise; actions: { CREATED: number; DELETED: number; MODIFIED: number; RENAMED: number; } } var nsfw: NsfwFunction; export = nsfw; } </ins>

Discussion:
VSCode Version: 1.17.0 () OS Version: Ubuntu 16.04 LTS Steps to Reproduce: "files.useExperimentalFileWatcher": true and close VS Code a symlink to root directory (must be an absolute link, not relative!): directory containing that symlink in VS Code: processes - one of vs code processes takes high CPU Reproduces without extensions: Yes See also:
Just noticed the same thing on osx...
Updating issue with: vs code version 1.17.0 reproduces without extensions ! Also, I found memory usage increasing over time...
Same issue here vs code version 1.17.2 Even after closing the VsCode the Code Helpers is still running with 100% CPU usage.
Reported upstream
Upstream PR
The original PR was closed so I opened one which was merged , just need a release to pull this in.
I have vscode 1.19.2 on Ubuntu. The various nodemodules directories have symbolic links point to each other that form the circular links. The nodemodules is set excluded in "files.watcherExclude". After vscode is started, it uses 100% CPU and memory usage increased dramatically and soon reached the max memory and hang the system. This problem happens whatever useExperimentalFileWatcher is set true or false. The ps shows the problem code process has parameter '--type=watcherService". Attached gdb to the process, it shows the watcher follows through the circular symbolic links in circular. Set "search.followSymlinks": false has no effect,. So this problem still happens in 1.19.2 even with all the right settings in place.
is it possible/easy to patch VS Code to stop this behaviour while waiting for it to hit a release? I have a workspace that causes a 20GB VM to exhaust its memory in about 15 mins because of circular symlinks (it uses lerna).
yeah I'll fork the module to get this in, was hoping I wouldn't need to.
what's the expected behavior after the change? I'm still seeing high CPU on today's insiders version on Ubuntu ! on Mac
the fix is specific to Linux only when you have experimental file watcher set to true in settings (or you have a multi-root workspace open).
If you have this issue, it's not just high CPU usage - your memory will be exhausted within minutes.

With a workspace with circular symlinks in it (it uses lerna and has circular dependencies), I was seeing 20GB of RAM get sucked up in about 15 minutes. Insiders has had the fix for a while now.
thanks, I'll mark as verified since you saw it before :+1: