Extension host freezes for a long time on startup in large client-side workspaces (workspace indexing queues every file)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 55/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- typescript, vscode
調査の方向性
Start with src/utils/documentIndex.ts at indexWorkspaceFolder and src/utils/index.ts at Semaphore.release; the issue links to the relevant lines. Trace how workspace files are discovered and queued, then inspect how importability checks handle non-ObjectScript files. Reproduce with a large workspace and compare startup responsiveness; done means indexing no longer causes a long extension host freeze.
索引モデルが issue の本文から書いたものです。
説明
Description
In a project workspace folder with about 300,000 files, of which only a small part are ObjectScript classes and routines, the extension host becomes unresponsive for more than a minute after every start or window reload. During that time no completions or hovers work for any extension. VS Code attributes the freeze to vscode-objectscript extension (about 90% of the sampled time):
[info] [Window] Extension host (LocalProcess pid: 27936) is unresponsive.
[warning] [Window] UNRESPONSIVE extension host: 'intersystems-community.vscode-objectscript' took 90.05% of 4508.89ms
[info] [Window] Extension host (LocalProcess pid: 27936) is responsive. <- ~65s later
Cause (v3.8.7, same on master)
indexWorkspaceFolder(documentIndex.ts#L192) runsfindFiles("{**/*}")and queues one rate-limited task per file. That is hundreds of thousands of tasks.Semaphore.release()(index.ts#L1185) dequeues withArray.prototype.shift(), which is O(n) on an array this large. Draining the queue is therefore O(n²), and most of the CPU time goes intorelease.- Every task, including those for non-ObjectScript files, calls
isImportableLocalFile. ThroughcspAppsForUriandotherDocExtsForUrithat constructs twoAtelierAPIobjects and reads the configuration, once per file.
I made sure that excluding the non-ObjectScript code folders via files.exclude removes the freeze.
Suggestions for improving behavior
- Is it possible to filter files by extension before queueing, or pass a narrower glob to
findFiles? - Alternatively, adding a setting to the extension that allows for listing project subdirectories containing ObjectScript code (or, conversely, those that do not contain ObjectScript code) might also help solve the problem.
Environment
vscode-objectscript 3.8.7, VS Code 1.145.2, Windows 11
(actually, the problem existed in earlier versions as well, I’ve only now managed to figure out what was going on)
- 主要言語
- TypeScript
- スター
- 117
- フォーク
- 59
- 平均マージ
- 2日 8分
- マージ済み PR(30日)
- 11
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
intersystems-community/vscode-objectscript のほかの issue
-
Folder import and compile reports missing User.* classes although compiling the open class succeeds対応中かも @isc-bsaviano が 1 日前に担当しました。 オープンbug
intersystems-community/vscode-objectscript#1900 · コメント 3 件 · リアクション 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Extesion change file encoding after save.対応中かも @isc-bsaviano が 1 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 56/100
intersystems-community/vscode-objectscript#1897 · コメント 5 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Cant' compileオープン
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
intersystems-community/vscode-objectscript#1889 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
Workspace folder name can override objectscript.conn.server when it matches a server name再び着手できるかも @isc-bsaviano が 31 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンbug
intersystems-community/vscode-objectscript#1885 · コメント 4 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
upstream
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
intersystems-community/vscode-objectscript#1876 · コメント 18 件 ·
メンテナーはふだん 1 日以内に返信
intersystems-community/vscode-objectscript の issue をすべて見る
似ている issue
-
Add: Shop On TV SDオープンcheck:passed streams:add
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
メンテナーはふだん 1 日以内に返信
-
bug implicit-state
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
book-layout.spec fails when the similar-books rail holds other projects' books対応中かも @praetorianer777 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
praetorianer777/GoTome#373 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Tencent/tdesign-react#4465 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
area:cards enhancement ready-for-agent
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
fil-donadoni/tolaria#8883 ·
メンテナーはふだん 1 日以内に返信