swiftlang / sourcekit-lsp

Language Server Protocol implementation for Swift and C-based languages
Apache License 2.0
3.3k stars 273 forks source link

Set the priority of processes launched for background indexing #1434

Closed ahoppen closed 4 months ago

ahoppen commented 4 months ago

Unfortunately, setpriority only allows reduction of a process’s priority and doesn’t support priority elevation (unless you are a super user). I still think that it’s valuable to set the process’s priority based on the task priority when it is launched because many indexing processes never get their priority escalated and should thus run in the background.

On Windows, we can elevate the process’s priority.

rdar://127474245

ahoppen commented 4 months ago

@swift-ci Please test

ahoppen commented 4 months ago

@swift-ci Please test

ahoppen commented 4 months ago

@swift-ci Please test

ahoppen commented 4 months ago

@swift-ci Please test Windows