haskell / hie-bios

Set up a GHC API session for various Haskell Projects
https://hackage.haskell.org/package/hie-bios
BSD 3-Clause "New" or "Revised" License
181 stars 63 forks source link

Decrease priority of compilation jobs to increase UX responsiveness. #399

Open mgajda opened 1 year ago

mgajda commented 1 year ago

HIE is expected to respond to events quickly, just like its ancestor is expected to be UI process. However, the compilations are generally batch jobs that can take longer time to complete, and should not delay UI.

I suggest we use System.Process.nice to decrease priority of any compilation job we call. That assures our interactivity is unhindered when we open a big project, and start compiling it with all numCapabilities.

This continues discussion from here:

https://github.com/haskell/haskell-language-server/issues/3528

mgajda commented 1 year ago

@michaelpj Is that what you suggested in https://github.com/haskell/haskell-language-server/issues/3528?

fendor commented 1 year ago

Yeah, I think that is sensible. I'd merge a PR for it.