Description
Is your enhancement request related to a problem? Please describe.
The language server often compiles for a long time.
When compiling, it should stay in the background, and never to delay user interface.
So all compilations should be ran with batch priority.
Additionally, the language server itself is asynchronously feeding information to user interface.
So it should also decrease its own priority as compared to the calling editor.
Describe the solution you'd like
Decrease priority of language server, and all compilation subprocesses.
Describe alternatives you've considered
Alternative is automatically detecting all GHC/Stack/Cabal processes running,
and renice them. It is more complicated, and gives user interfaces a duty to configure it
herself. This also delays implementation of the policy, and for a short time
the compilation will still be prioritized.
Particularly painful, if user wants a speedy parallel compilation on a multicore,
and since GHC compiler hogs available RAM.
Additional context
I can add necessary System.Process.nice
calls before calls of executeProcess
,
if the MR would be accepted.