microsoft / microsoft/TypeScript

`invalidateResolutionsOfFailedLookupLocations` hogs the CPU for a large project

オープン
#62,054 コメント 0 件 リアクション 0 件 担当者 1 名 GitHub で見る

@sheetalkamat がすでに取り組んでいます。

2025年7月14日 から。

Needs Investigation
主要言語
Go
スター
111k
フォーク
14.3k
平均マージ
2日 4時間
マージ済み PR(30日)
132

説明

### 🔎 Search Terms

performance invalidateResolutionsOfFailedLookupLocations tsserver

### 🕗 Version & Regression Information

Typescript version 5.8.3

### ⏯ Playground Link

_No response_

### 💻 Code

```ts
// Your code here
```

### 🙁 Actual behavior

I'm using vscode on a large project and the tsserver gets stuck very frequently (every 5 minutes). TSServer process is at max CPU usage. Profiling it revealed that it's spending all of the CPU time inside `invalidateResolutionsOfFailedLookupLocations` function. I'm attaching a trace below.

[vscode-profile-2025-07-12-16-00-06.cpuprofile](https://github.com/user-attachments/files/21196644/vscode-profile-2025-07-12-16-00-06.cpuprofile)

### 🙂 Expected behavior

TSServer not get stuck

### Additional information about the issue

The repo in question is https://github.com/dxos/dxos

To get started:

```
pnpm install && pnpm build
```

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。