microsoft / microsoft/TypeScript

`invalidateResolutionsOfFailedLookupLocations` hogs the CPU for a large project

Aperta
#62,054 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@sheetalkamat ci sta già lavorando.

Dal 14/7/2025.

Needs Investigation
Lingua principale
Go
Stelle
111k
Fork
14.3k
Merge medio
2g 4h
PR unite (30g)
132

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.