Repository: TypeScript
Issue: IntelliSense not functioning in large project sometimes
Labels: Needs More Info

### 🔎 Search Terms

language server loading
updateGraphWorker
IntelliSense not working

### 🕗 Version & Regression Information

- This is a crash
- This changed between versions ______ and _______
- This changed in commit or PR _______
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
- I was unable to test this on prior versions because _______


### ⏯ Playground Link

_No response_

### 💻 Code

_No response_

### 🙁 Actual behavior

While working on a large TypeScript project, we have encountered a decline in the developer experience as the project continues to grow. One particular issue we have experienced is that IntelliSense consistently gets stuck without any apparent reason. To investigate this further, I attempted to enable the debug mode of the TypeScript server and discovered that it hangs at the updateGraphWorker stage.


```log
Info 17820[15:27:03.183] -----------------------------------------------
Info 17820[15:27:03.195] event:
    {"seq":0,"type":"event","event":"projectLoadingFinish","body":{"projectName":"/path/to/some/json"}}
Info 17820[15:27:03.202] event:
    {"seq":0,"type":"event","event":"telemetry","body":{"telemetryEventName":"projectInfo","payload":{"projectId":"xxxx","fileStats":{"js":0,"jsSize":0,"jsx":0,"jsxSize":0,"ts":1744,"tsSize":2689631,"tsx":108,"tsxSize":347124,"dts":3944,"dtsSize":8979876,"deferred":0,"deferredSize":0},"compilerOptions":{"experimentalDecorators":true,"emitDecoratorMetadata":true,"strict":true,"allowUnreachableCode":false,"outDir":"","target":"es2022","declaration":true,"module":"esnext","esModuleInterop":true,"moduleResolution":"node10","verbatimModuleSyntax":true,"useDefineForClassFields":false,"sourceMap":true,"skipLibCheck":true,"plugins":[""],"jsx":"preserve","baseUrl":"","paths":"","composite":true,"rootDir":"","declarationDir":"","resolveJsonModule":true},"typeAcquisition":{"enable":false,"include":false,"exclude":false},"extends":true,"files":false,"include":true,"exclude":false,"compileOnSave":false,"configFileName":"tsconfig.json","projectType":"configured","languageServiceEnabled":true,"version":"5.2.2"}}}
Info 17820[15:27:03.203] Creating configuration project /path/to/some/json
Info 17820[15:27:03.203] event:
    {"seq":0,"type":"event","event":"projectLoadingStart","body":{"projectName":"/path/to/some/json"}}
Info 17820[15:27:03.204] FileWatcher:: Added:: WatchInfo: /path/to/some/ts 500 undefined WatchType: Closed Script info
Info 17821[15:27:03.205] FileWatcher:: Added:: WatchInfo: /path/to/some/ts 500 undefined WatchType: Closed Script info
Info 17821[15:27:03.206] FileWatcher:: Added:: WatchInfo: /path/to/some/ts 500 undefined WatchType: Closed Script info
Info 17821[15:27:03.206] FileWatcher:: Added:: WatchInfo: /path/to/some/ts 500 undefined WatchType: Closed Script info
Info 17821[15:27:03.207] FileWatcher:: Added:: WatchInfo: /path/to/some/ts 500 undefined WatchType: Closed Script info
Info 17821[15:27:03.207] FileWatcher:: Added:: WatchInfo: /path/to/some/ts 500 undefined WatchType: Closed Script info
Info 17821[15:27:03.208] FileWatcher:: Added:: WatchInfo: /path/to/some/ts 500 undefined WatchType: Closed Script info
Info 17821[15:27:03.223] Starting updateGraphWorker: Project: /path/to/some/json
Info 17821[15:27:03.311] DirectoryWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: Failed Lookup Locations
Info 17821[15:27:03.311] Elapsed:: 0.012974977493286133ms DirectoryWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: Failed Lookup Locations
Info 17821[15:27:03.311] DirectoryWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: Failed Lookup Locations
Info 17822[15:27:03.311] Elapsed:: 0.0058460235595703125ms DirectoryWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: Failed Lookup Locations
Info 17822[15:27:03.311] DirectoryWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: Failed Lookup Locations
Info 17822[15:27:03.311] Elapsed:: 0.0055010318756103516ms DirectoryWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: Failed Lookup Locations
Info 17822[15:27:03.311] DirectoryWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: Failed Lookup Locations
Info 17822[15:27:03.311] Elapsed:: 0.011311054229736328ms DirectoryWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: Failed Lookup Locations
Info 17822[15:27:03.311] DirectoryWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: Failed Lookup Locations
Info 17822[15:27:03.311] Elapsed:: 0.004781007766723633ms DirectoryWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: Failed Lookup Locations
Info 17822[15:27:03.312] DirectoryWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: Failed Lookup Locations
Info 17822[15:27:03.312] Elapsed:: 0.008038997650146484ms DirectoryWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: Failed Lookup Locations
Info 17822[15:27:03.312] FileWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: File location affecting resolution
Info 17823[15:27:03.316] DirectoryWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: Failed Lookup Locations
Info 17823[15:27:03.316] Elapsed:: 0.010488033294677734ms DirectoryWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: Failed Lookup Locations
Info 17823[15:27:03.317] FileWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: File location affecting resolution
Info 17823[15:27:03.319] FileWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: File location affecting resolution
Info 17823[15:27:03.322] FileWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: File location affecting resolution
Info 17823[15:27:03.824] DirectoryWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: Failed Lookup Locations
Info 17823[15:27:03.824] Elapsed:: 0.0059119462966918945ms DirectoryWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: Failed Lookup Locations
Info 17823[15:27:03.915] DirectoryWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: Failed Lookup Locations
Info 17823[15:27:03.915] Elapsed:: 0.008075952529907227ms DirectoryWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: Failed Lookup Locations
Info 17823[15:27:04.015] FileWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: File location affecting resolution
Info 17824[15:27:04.532] FileWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: File location affecting resolution
Info 17824[15:27:05.703] FileWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: File location affecting resolution
Info 17824[15:27:05.748] FileWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: File location affecting resolution
Info 17824[15:27:07.812] FileWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: File location affecting resolution
Info 17824[15:27:07.843] FileWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: File location affecting resolution
Info 17824[15:27:08.790] FileWatcher:: Added:: WatchInfo: /path/to/some/json WatchType: File location affecting resolution

# log stops here
```


### 🙂 Expected behavior

In our large project, we expect IntelliSense to work smoothly since the project can be type checked within approximately 2 minutes.

### Additional information about the issue

_No response_