You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
vscode appears to use ripgrep for file searches in two places: ripgrepTextSearchEngine.ts and ripgrepFileSearch.ts. ripgrep has a -j/--threads argument with a default value of 0, which "causes ripgrep to choose the thread count using heuristics", which is to say that it's implicitly multithreaded with some unknown number of threads.
I believe this is the root cause of a number of other issues filed with excessive CPU/memory usage by ripgrep (e.g. #203425), though certainly launching too many rg processes can be a problem regardless.
One issue I haven't seen reported is that on a distributed file system, having too many file search threads running simultaneously can severely degrade performance. In fact we're seeing a single user able to cause a weka filesystem to hang for a minute or more just through a remote VScode session launching one or two ripgrep processes.
I'd like to request a configuration option to set the number of threads (the -j argument to rg) wherever ripgrep is used. I'd prefer the default to be 1 to disable implicit multithreading, but 0 would be fine as long as the configuration option exists.
Reacted by Alexandru Avadanii, Dylan Bargatze, John Murray, Chris Walter, James Chiang, Jim Bosch, Ian Sullivan, Russ Allbery, Josh Meyers, pecom and 20 more
This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.
🙂 This feature request received a sufficient number of community upvotes and we moved it to our backlog. To learn more about how we handle feature requests, please see our documentation.
Activity
vscodenpa commentedon Mar 22, 2024
This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!
vscodenpa commentedon Mar 26, 2024
🙂 This feature request received a sufficient number of community upvotes and we moved it to our backlog. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!
andreamah commentedon Jun 24, 2024
verification steps:
rg.exein the process explorer should not have the--threadsargument.search.ripgrep.maxThreadsto 1rg.exein the process explorer should have the--threads 1argument.See #213511 (comment) for images.