Repository: vscode
Issue: vscode hang when try to delete a large directory
Labels: bug,file-io

Type: <b>Bug</b>

I have a directory about 100000 files total 3T size.
When I right click it and select "delete permanently", vscode terminal get hang. And later, remote ssh connection is broken. I then reload vscode and vscode told me it cannot save the editing file.

I searched github issues. All related issues are closed. The earliest issue even go to 2018. But now I still got this issue.

The most thing confusing me is that, why can't vscode just `rm -rf` the directory in the background? What is vscode doing when it hangs?

I tried to `rm -rf` the directory in terminal. It also takes some time, but other part of vscode works well.



VS Code version: Code 1.90.1 (611f9bfce64f25108829dd295f54a6894e87339d, 2024-06-11T21:44:54.914Z)
OS version: Darwin arm64 23.5.0
Modes:
Connection to 'ssh-remote+dsw' could not be established
Remote OS version: Linux x64 4.19.91-014-kangaroo.2.10.13.5c249cdaf.x86_64
Connection to 'ssh-remote+dsw' could not be established
Connection to 'ssh-remote+dlc-rlhf-1' could not be established

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|Apple M1 Pro (10 x 2400)|
|GPU Status|2d_canvas: enabled<br>canvas_oop_rasterization: enabled_on<br>direct_rendering_display_compositor: disabled_off_ok<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>opengl: enabled_on<br>rasterization: enabled<br>raw_draw: disabled_off_ok<br>skia_graphite: disabled_off<br>video_decode: enabled<br>video_encode: enabled<br>webgl: enabled<br>webgl2: enabled<br>webgpu: enabled|
|Load (avg)|3, 3, 3|
|Memory (System)|32.00GB (0.29GB free)|
|Process Argv||
|Screen Reader|no|
|VM|0%|

Connection to 'ssh-remote+dsw' could not be established

|Item|Value|
|---|---|
|Remote|SSH: dlc-rlhf-1|
|OS|Linux x64 4.19.91-014-kangaroo.2.10.13.5c249cdaf.x86_64|
|CPUs|Intel(R) Xeon(R) Processor (64 x 0)|
|Memory (System)|1500.00GB (1488.78GB free)|
|VM|11%|

Connection to 'ssh-remote+dsw' could not be established

Connection to 'ssh-remote+dlc-rlhf-1' could not be established
</details><details><summary>Extensions (37)</summary>

Extension|Author (truncated)|Version
---|---|---
better-comments|aar|3.0.2
vsc-python-indent|Kev|1.18.0
jupyter-keymap|ms-|1.1.2
remote-ssh|ms-|0.112.0
remote-explorer|ms-|0.4.3
material-icon-theme|PKi|5.4.2
svg-preview|Sim|2.8.3
better-comments|aar|3.0.2
gitlens|eam|15.1.0
prettier-vscode|esb|10.4.0
code-runner|for|0.12.2
shell-format|fox|7.2.5
copilot|Git|1.203.0
copilot-chat|Git|0.16.1
vsc-python-indent|Kev|1.18.0
vscode-color-identifiers-mode|Mat|1.3.0
vscode-language-pack-zh-hans|MS-|1.89.2024050109
black-formatter|ms-|2024.2.0
debugpy|ms-|2024.6.0
flake8|ms-|2023.10.0
isort|ms-|2023.10.1
python|ms-|2024.8.1
vscode-pylance|ms-|2024.6.1
jupyter|ms-|2024.5.0
jupyter-keymap|ms-|1.1.2
jupyter-renderers|ms-|1.0.18
tensorboard|ms-|2023.10.1002992421
vscode-jupyter-cell-tags|ms-|0.1.9
vscode-jupyter-slideshow|ms-|0.1.6
hexeditor|ms-|1.10.0
material-icon-theme|PKi|5.4.2
datetime|rid|2.2.2
partial-diff|ryu|1.4.3
svg-preview|Sim|2.8.3
code-spell-checker|str|3.0.1
sort-lines|Tyr|1.11.0
vscode-sqlite3-editor|yy0|1.0.188


</details>
<!-- generated by issue reporter -->