Stream: beginners

Topic: Roc Language Server maxing out CPU usage


view this post on Zulip Ian McLerran (May 13 2024 at 18:19):

Anyone else experience this? I've had to kill the language server repeatedly cuz it keeps tanking my CPU over the last 24 hours...
Screenshot-2024-05-13-at-08.45.19.png

view this post on Zulip Richard Feldman (May 13 2024 at 20:29):

how recently have you updated? @Eli Dowling shipped an update related to preventing that a few weeks ago

view this post on Zulip Ian McLerran (May 13 2024 at 21:03):

My roc version is May 13

view this post on Zulip Ian McLerran (May 13 2024 at 21:05):

Lang server should be updated side-by-side... I'm using the tarball and not the git repo, but I don't think that should matter...

view this post on Zulip Ian McLerran (May 13 2024 at 21:06):

output from roc version:

roc nightly pre-release, built from commit e5ea6dc4617 on Mon May 13 10:47:45 UTC 2024

view this post on Zulip Ian McLerran (Jun 19 2024 at 20:34):

Screenshot-2024-06-19-at-15.32.24.png
Screenshot-2024-06-19-at-15.32.33.png

view this post on Zulip Luke Boswell (Jun 19 2024 at 20:38):

I was having this issue a little while back. This PR resolved it https://github.com/roc-lang/roc/pull/6792

From the notes, it mentions we default to main.roc, just wondering if maybe that could be related?

Or maybe the latest nightly doesn't include this change?

view this post on Zulip Ian McLerran (Jun 19 2024 at 20:40):

Ooh, whoops, I see I don't have the latest nightly. Just pulled that in...

view this post on Zulip Agus Zubiaga (Jun 19 2024 at 20:40):

I believe there are other issues that cause lang server hangs, but that PR fixed one of the most common

view this post on Zulip Agus Zubiaga (Jun 19 2024 at 20:41):

Luke Boswell said:

From the notes, it mentions we default to main.roc, just wondering if maybe that could be related?

If it doesn't find main.roc, it will show an error instead of hanging

view this post on Zulip Ian McLerran (Jun 19 2024 at 20:45):

Yeah, I was on the June 1 build. I think the PR came in about a week later. I did run a roc check on a Module prior to noticing my computer performance take a nose dive (and then realize the language server had hung). So that was almost certainly the cause. I'm assuming that the June 19 nightly I just pulled down incorporates #6792.

view this post on Zulip Ian McLerran (Jun 19 2024 at 20:49):

Side note... I didn't realize till just now that Zulip auto hyperlinks #number to the corresponding issue/PR on the roc repo.

view this post on Zulip Eli Dowling (Jun 19 2024 at 21:14):

Keep us updated on this, I can definitely do some investigating if it's still an issue :)


Last updated: Jul 06 2025 at 12:14 UTC