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
1.133.0 cell diagnostics spawn one whole-workspace ripgrep search per code cell (--no-ignore), freezing VS Code on workspaces with an embedded venv #993
After the extension auto-updated to 1.133.0, opening or editing a .qmd
with many Python code cells spawns hundreds of concurrent ripgrep
processes through VS Code's search service — we captured a peak of 255
simultaneous rg processes, several above 150 % CPU, which made the machine
unusable and forced repeated VS Code restarts. The behavior started the day
1.133.0 was released and did not occur with 1.132.0.
Each rg process is a whole-workspace file search for one of the virtual
documents the extension creates per code cell:
One search per cell, re-triggered while editing (the quarto.cells.diagnostics.debounceDelay of 500 ms is far shorter than the
search duration, so processes stack up faster than they finish).
--no-ignore --no-ignore-global — the search cannot skip .gitignored directories. Our workspace has its uv-managed venv at the
root (.venv/, ~48,000 files, ignored via .venv/.gitignore), so every
single search crawls all 48k files and takes ~20 s. The exclusion set in
the command line (.git, .svn, .hg, .DS_Store, Thumbs.db) is
exactly VS Code's files.exclude default, i.e. the signature of a workspace.findFiles(pattern) call with no custom excludes.
The searched filenames (/.vdoc.<uuid>.py) are the per-cell virtual
documents introduced for the new cell diagnostics feature (Cell diagnostics #980), and the
storm stops completely when quarto.cells.diagnostics.enabled is set to false, so the new feature is the trigger.
The parent of every rg process is VS Code's extension-API search host
(Code Helper (Plugin), node.mojom.NodeService), confirming the searches
come through the extension API rather than user-initiated search.
Workaround
// settings.json"quarto.cells.diagnostics.enabled": false,
// defense in depth: cap any residual findFiles at the project tree"files.exclude": { "**/.venv": true }
immediately ends the storm (verified: zero rg processes over a 6-minute
observation window after a window reload, same editing activity).
Steps to reproduce
Create a workspace whose root contains a large directory that is not in
VS Code's files.exclude (a Python venv is the canonical case: uv venv && uv pip install jupyterlab lightgbm scikit-learn yields tens
of thousands of files; the venv being gitignored does not help because
the searches run with --no-ignore).
Install the Quarto extension 1.133.0 and the Python extension.
Open a .qmd containing a few dozen Python code cells and type in some of
them.
Watch the process count: watch -n 2 'pgrep -x rg | wc -l'. Within a
minute or two it climbs into the dozens-to-hundreds, each process pinned
on enumerating the venv.
Observed on a Quarto book project with 15 chapters of ~30 cells each; the
peak of 255 concurrent rg processes was recorded by a ps sampler within
seconds of opening one chapter.
Actual behavior
While the storm is active:
the extension host is repeatedly flagged unresponsive
(Extension host (LocalProcess pid: …) is unresponsive.), with the
profiler attributing the time to the Python extension stack that the
diagnostics feature activates (ms-python.python is activated with root cause: quarto.quarto);
even the extension's own activation can fail: Not activating extension 'quarto.quarto': Timed out while searching for 'workspaceContains' pattern **/*.{qmd,rmd},... — the workspaceContains
file search times out against the saturated search service.
Expected behavior
Cell diagnostics should not need a whole-workspace file enumeration per cell
per edit. If a findFiles-style lookup of the vdoc URI is required at all, it
should (a) be cached or scoped to the workspace root rather than globbed
recursively, (b) honour ignore files / default excludes so a venv or node_modules is never crawled, and (c) be coalesced so that concurrent
searches cannot pile up unboundedly.
Bug description
After the extension auto-updated to 1.133.0, opening or editing a
.qmdwith many Python code cells spawns hundreds of concurrent ripgrep
processes through VS Code's search service — we captured a peak of 255
simultaneous
rgprocesses, several above 150 % CPU, which made the machineunusable and forced repeated VS Code restarts. The behavior started the day
1.133.0 was released and did not occur with 1.132.0.
Each
rgprocess is a whole-workspace file search for one of the virtualdocuments the extension creates per code cell:
Three properties make this pathological:
quarto.cells.diagnostics.debounceDelayof 500 ms is far shorter than thesearch duration, so processes stack up faster than they finish).
--no-ignore --no-ignore-global— the search cannot skip.gitignored directories. Our workspace has its uv-managed venv at theroot (
.venv/, ~48,000 files, ignored via.venv/.gitignore), so everysingle search crawls all 48k files and takes ~20 s. The exclusion set in
the command line (
.git,.svn,.hg,.DS_Store,Thumbs.db) isexactly VS Code's
files.excludedefault, i.e. the signature of aworkspace.findFiles(pattern)call with no custom excludes./.vdoc.<uuid>.py) are the per-cell virtualdocuments introduced for the new cell diagnostics feature (Cell diagnostics #980), and the
storm stops completely when
quarto.cells.diagnostics.enabledis set tofalse, so the new feature is the trigger.The parent of every
rgprocess is VS Code's extension-API search host(
Code Helper (Plugin), node.mojom.NodeService), confirming the searchescome through the extension API rather than user-initiated search.
Workaround
immediately ends the storm (verified: zero
rgprocesses over a 6-minuteobservation window after a window reload, same editing activity).
Steps to reproduce
VS Code's
files.exclude(a Python venv is the canonical case:uv venv && uv pip install jupyterlab lightgbm scikit-learnyields tensof thousands of files; the venv being gitignored does not help because
the searches run with
--no-ignore)..qmdcontaining a few dozen Python code cells and type in some ofthem.
watch -n 2 'pgrep -x rg | wc -l'. Within aminute or two it climbs into the dozens-to-hundreds, each process pinned
on enumerating the venv.
Observed on a Quarto book project with 15 chapters of ~30 cells each; the
peak of 255 concurrent
rgprocesses was recorded by apssampler withinseconds of opening one chapter.
Actual behavior
While the storm is active:
(
Extension host (LocalProcess pid: …) is unresponsive.), with theprofiler attributing the time to the Python extension stack that the
diagnostics feature activates (
ms-python.pythonis activated withroot cause: quarto.quarto);Not activating extension 'quarto.quarto': Timed out while searching for 'workspaceContains' pattern **/*.{qmd,rmd},...— theworkspaceContainsfile search times out against the saturated search service.
Expected behavior
Cell diagnostics should not need a whole-workspace file enumeration per cell
per edit. If a
findFiles-style lookup of the vdoc URI is required at all, itshould (a) be cached or scoped to the workspace root rather than globbed
recursively, (b) honour ignore files / default excludes so a venv or
node_modulesis never crawled, and (c) be coalesced so that concurrentsearches cannot pile up unboundedly.
Your environment
Possibly related (vdoc lifecycle / large-workspace scans): #939, #855, #819, #799.