haskell / haskell/haskell-language-server

Haskell language server should always have lower process priority than its caller

Open
#3,528 6 comments 1 reaction 0 assignees View on GitHub
type: enhancement
Dominant language
Haskell
Stars
3k
Forks
455
Avg merge
3d 21h
Merged PRs (30d)
13

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.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the language server's calls to executeProcess and review the proposed System.Process.nice calls. Determine how to lower the language server and compilation subprocess priorities, then verify that both remain lower priority than the calling editor without disrupting compilation.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
devtools
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.