haskell-language-server icon indicating copy to clipboard operation
haskell-language-server copied to clipboard

Reduce lag when editing by merging sequential Shake restarts

Open soulomoon opened this issue 3 months ago • 3 comments

When working with large codebases (e.g. the GHC codebase) using HLS, inserting something as simple as a comment can sometimes feel noticeably laggy.

It seems this is due to multiple Shake restarts being triggered in quick succession, where each restart kills and spawns many threads. This repeated teardown/startup amplifies latency.

Proposal: Consider merging consecutive Shake restarts that occur close together into a single restart, instead of handling each one individually. This should help smooth out the editing experience and reduce unnecessary thread churn.

soulomoon avatar Sep 09 '25 05:09 soulomoon

Can I work on it .

kishansinghifs1 avatar Oct 15 '25 08:10 kishansinghifs1

Thank you for being interested, but I realize it won't help. Since a file edit event triggers and waits for a session restart. And the next file edit event won't arrive before the last event finished. @kishansinghifs1

soulomoon avatar Oct 15 '25 18:10 soulomoon

Thanks for the response @soulomoon I appreciate that .

kishansinghifs1 avatar Oct 18 '25 14:10 kishansinghifs1