Swift compiler hangs and SourceKit-LSP unresponsiveness during background script execution

Hi everyone,

I’ve been working on a fairly large Swift project on Windows recently, but I’ve hit a wall with the responsiveness of the compiler and the LSP in VS Code when I have background tasks running.

Specifically, I’m using a download app community setup to handle some automated script execution and local data logging for my dev environment. I’ve noticed that whenever the executor is active and running a heavy cycle, the swift-frontend process spikes in CPU usage and often hangs. Even worse, the SourceKit-LSP becomes completely unresponsive, which kills all my syntax highlighting and autocomplete until I restart the IDE. It feels like there is some shared resource contention between the executor's internal threading and how Swift’s build tools manage their worker processes.

I have a few related technical questions for the experts here:

I’m not sure if the way a download app style environment manages its system hooks is causing a conflict with the file system watcher that SwiftPM uses to detect changes. Has anyone else encountered performance bottlenecks or "Socket connection closed" errors with their LSP while running high-level script executors in the background? I am also wondering if I should try to download app configurations or adjust the MAX_CONCURRENT_THREADS in my Swift build settings to prevent the two environments from starving each other of CPU cycles.

I really need to keep my automation running while I code, but the constant IDE lag is making it difficult to maintain a good workflow. If anyone has experience optimizing a Windows dev environment for concurrent usage of heavy script executors and Swift toolchains, I’d love to hear your advice!

Thanks!