Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux: WatcherService consumes 100% cpu on large folder #355

Closed
halyavin opened this issue Nov 20, 2015 · 9 comments
Closed

Linux: WatcherService consumes 100% cpu on large folder #355

halyavin opened this issue Nov 20, 2015 · 9 comments
Assignees
Labels
linux Issues with VS Code on Linux verified Verification succeeded
Milestone

Comments

@halyavin
Copy link

As soon as I open Visual Studio Code, the watcherService process (a process with flag --type=watcherService) started from the renderer process starts to consume 100% cpu and 60Mb to 1.6 Gb of memory. If I kill the process, it relaunches immediately. No other process consumes cpu in the idle state.
Version: 0.10.1
OS: Ubuntu 14.04

@bpasero
Copy link
Member

bpasero commented Nov 20, 2015

@halyavin could it be that you open a large folder with many files?

@halyavin
Copy link
Author

Yes, this is a large folder with many files. But why it consumes 100% of cpu indefinitely? Eclipse doesn't have such problem on this project.

@bpasero bpasero changed the title WatcherService consumes 100% cpu. Linux: WatcherService consumes 100% cpu on large folder Nov 21, 2015
@bpasero
Copy link
Member

bpasero commented Nov 21, 2015

@halyavin our watcher implementation on Linux is not very good, it has to scan each folder for changes which can be time consuming. You can use the files.exclude setting to add folders you dont need to see in the explorer and it will also exclude them from watching.

@halyavin
Copy link
Author

May be switch off global project watching (restrict it to currently edited files) and make user press refresh? There is a great chance an efficient Linux watching will never be implemented.

@bpasero bpasero added the help wanted Issues identified as good community contribution opportunities label Nov 23, 2015
@bpasero
Copy link
Member

bpasero commented Nov 23, 2015

I would accept help here if someone has an idea for efficient Linux file watching.

@bpasero bpasero added bug Issue identified by VS Code Team member as probable bug and removed bug Issue identified by VS Code Team member as probable bug labels Nov 24, 2015
@bpasero bpasero modified the milestone: Backlog Nov 26, 2015
@wycats
Copy link

wycats commented Nov 28, 2015

I'm experiencing a similar issue on OSX with ElectronHelper.

@halyavin
Copy link
Author

halyavin commented Dec 4, 2015

I just found out, by looking at the process tree on my machine, that IntelliJ IDEA has a similar process for Linux file watching and they made in open source (Apache license):
https://github.com/JetBrains/intellij-community/tree/master/native/fsNotifier/linux . You can just reuse it for VS Code.

@chadhietala
Copy link

Seeing the same thing on OSX with ElectronHelper.

@Tyriar Tyriar added the linux Issues with VS Code on Linux label Feb 3, 2016
@bpasero
Copy link
Member

bpasero commented Mar 11, 2016

Closing in favor of #3998

@bpasero bpasero closed this as completed Mar 11, 2016
@bpasero bpasero removed bug Issue identified by VS Code Team member as probable bug help wanted Issues identified as good community contribution opportunities labels Mar 18, 2016
@bpasero bpasero added the verified Verification succeeded label Apr 29, 2016
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
linux Issues with VS Code on Linux verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

5 participants