microsoft / microsoft/vscode-powerquery-sdk

TestWatcherManager runs recursive findFiles("**/*.testsettings.json") on activation, pins CPU on large/cloud-synced workspaces

Open
#419 0 comments 0 reactions 1 assignee View on GitHub

@mattmasson is already working on this.

Since Jun 17, 2026.

Dominant language
TypeScript
Stars
92
Forks
23
PR merge metrics
No merged PRs in 30d

Description

Version

0.7.1 (regression — 0.6.3 is unaffected; TestWatcherManager was introduced in #384)

Description

On activation, the new test-discovery path calls vscode.workspace.findFiles("**/*.testsettings.json") — a recursive glob over the entire workspace root — and then installs FileSystemWatchers on the results.

findFiles is ripgrep-backed, so this forces a full-tree walk regardless of where .testsettings.json files actually live. On a large workspace, or one hosted on OneDrive Files-On-Demand, the walk is expensive and hydrates placeholder files. The watchers then fire on sync/metadata churn, which re-triggers discovery, producing a ripgrep loop that pins multiple CPU cores and can exhaust system memory.

0.6.3 has no watcher/discovery subsystem and does not exhibit this.

Repro
  1. Open a large workspace whose root is on OneDrive Files-On-Demand.
  2. Activate the extension (0.7.1).
  3. Observe sustained multi-core rg.exe usage that does not settle.
Suggested fix

Scope discovery and watchers to the configured powerquery.sdk.test.settingsFiles paths (or the closest containing dirs) rather than a recursive **/* walk of the workspace root; honor search.exclude / files.exclude for the discovery glob.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.