Skip to content

rg heavy disk I/O usage, rg does not like brackets and is too greedy #282852

@paponius

Description

@paponius

Type: Bug

Opening a folder which does have square brackets in it's path.
The folder is on Samba network, the volume is mapped to a letter. (H:\Projects...)
But I have no reason to believe this issue is limited to a network path. I can't test it on local drive, as it's NVMe, very fast and small.
My H:\Projects\ dir contains many millions of files and is multiple TB in size.

The command line is: "c:\Apps\...\ripgrep\bin\rg.exe" --files --hidden --case-sensitive --no-require-git --no-ignore-parent --follow --no-config

rp is not searching for package.json or devcontainer.json file in this case.

I tested it again on different path and pulled a small project (h:\Projects[Various Scripts]\Browser-Extension\webextensions-examples-main).
From rg process' file handles I can see rg is accessing files directly under h:\Projects\. e.g. h:\Projects\ProjectA\...
And another clue is the Current directory from which the rp is started, which is just h:\Projects\
Also tested with all extension packages disabled.

OK:
When I remove the [] from path (by renaming the dir) and repeat previous steps, rp process runs for less than 1 sec.
(h:\Projects\Various Scripts\Browser-Extension\webextensions-examples-main)

Even if there was not the above issue, I believe rp is too aggressive and might be a problem in some cases. It's running a background task and should behave as such.
rp starts with one process with several threads. But few minutes later it will spin out of control with dozens of instances. I can't even see them all as the Process Explorer gets frozen at this point.
The client PC is high on CPU usage and the NAS is nearly frozen. Samba would take minutes to accommodate another task, like to copy 20 bytes big file.

In possibly not just my case, the H:\Project\ dir is not just bigger, but it contains some cross linked and recursively linked dirs.
I don't know if this would be an issue with rg, but anyway maybe there should be a limit, or best a dialog asking if search should continue for this workspace yes/no/never/always.

Screenshots Image Image Image

Similar:
microsoft/vscode-remote-release#10086
vscode-icons/vscode-icons#2652

VS Code version: Code 1.106.3 (bf9252a, 2025-11-25T22:28:18.024Z)
OS version: Windows_NT x64 10.0.22631
Modes:

System Info
Item Value
CPUs Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz (8 x 3600)
GPU Status 2d_canvas: enabled
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
trees_in_viz: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 31.91GB (13.67GB free)
Process Argv
Screen Reader no
VM 67%

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions