microsoft / microsoft/TypeScript

`invalidateResolutionsOfFailedLookupLocations` hogs the CPU for a large project

Đang mở
#62,054 0 bình luận 0 reaction 1 người được giao Xem trên GitHub

@sheetalkamat đang làm issue này rồi.

Từ ngày 14/7/2025.

Needs Investigation
Ngôn ngữ chính
Go
Star
111k
Fork
14.3k
Merge trung bình
2 ngày 4 giờ
Pull request đã merge (30 ngày)
132

Mô tả

### 🔎 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
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.