-
Notifications
You must be signed in to change notification settings - Fork 29.5k
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
Search Service consumes 70% of my CPU on startup for quite some time #34434
Comments
@joaomoreno FYI |
Yep, seeing the same |
Do they pile up when you do a text search or just quickopen? |
I start the product. That's it. My guess is that extensions using the |
I'm not seeing it, but I am seeing the error that @joaomoreno posted at least so I can start there. |
Can you grab the grab the args from a few of those |
nah, deleted the |
Can you give me your extensions list? |
I fixed the error that @joaomoreno posted. @dbaeumer's issue is possibly doing too much work because of #34487. I never saw @jrieken's issue but please try again. |
This is just killing me. @roblourens to reproduce do this
Yes, the activation of extensions is a little stupid and should merge the query per extension but the disk search should not spawn so many processes and eventually start queuing process execution and it should make sure to kill the processes (which is hard usually the child process must check if its parent pid is still alive and self-terminate) |
I can repro this on Also just to confirm, this isn't new, right? I see the same behavior with And also, there's yet another issue that Dirk shows where the rg processes terminate quickly, but the searchService uses high CPU for a long time. To summarize this issue up to this point:
|
Pushed the change to ensure it's killed. I will open an issue just for that to make sure it gets verified. The rest of #34434 (comment) I will investigate in October. |
If anybody here has the exact problems that I described above, I tracked it down to the Omnisharp-vscode C# extension. Try disabling that if you have issues. I've opened an issue here: dotnet/vscode-csharp#1770 |
Thanks for the datapoint - No need to file an issue on individual extensions, this will impact any extension that uses the You should see an improvement already in the latest insiders (https://az764295.vo.msecnd.net/insider/683a46efbab870527671f1ae55f9ebce5f3f5a3c/VSCode-darwin-insider-unsigned.zip) because we will batch these per extension. But it won't go away entirely. |
I see. I hadn't fully realised that there was a concrete issue with vscode itself that was causing these problems |
@roblourens I still see plenty of rg-processes (without a parent) on my machine. It's from
|
Unsure how these processes are meant to die but from my experience it is hopeless to try to manage from the outside, e.g. ext-host/renderer killing them on shutdown, because the "outside" my disappear without notice. Usually, we put something into the processes, like a pointer to the parent/owner, and when that disappears the processes shutdown themselves. Maybe you are already doing that tho... For instance the extension host checks every 5 secs if its owning renderer process is still around |
How are you killing vscode? It's not bulletproof but should at least work for a normal shutdown. We don't own the rg process, ideally I think we would run ripgrep as a library from a process we control, not yet possible. |
Depends, but during development and when I am in the console anyways often with Ctrl+C
I don't think that's enough, processes crash and when that happens it will leak. |
That's true but I think it's the best we can do without making a change in ripgrep. But it sounds like there is still the real problem of the rg processes not terminating when they are actually finished, which I haven't been able to repro. |
@jrieken You could use |
@jrieken Do you still see these? Could you post the full command line (the above seems truncated)? And maybe run the same command from the workspace folder (redirect stdout to /dev/null) to see what that does and outputs on stderr? |
Still an issue? I still haven't encountered this... |
Latest insider On Windows
You get:
The text was updated successfully, but these errors were encountered: