Stream: t-compiler/wg-rls-2.0

Topic: performance editing imports


Jake Goulding (Jul 15 2020 at 14:01, on Zulip):

Sometimes when I'm editing a use line, my emacs + lsp-mode + RA will freeze for multiple seconds. Before I go and try to make some reduced case, is this a known issue?

Laurențiu Nicola (Jul 15 2020 at 14:02, on Zulip):

I haven't noticed that in Code, but see https://www.reddit.com/r/rust/comments/hqdgli/rustanalyzer_changelog_33/fxxejo0/

Florian Diebold (Jul 15 2020 at 14:04, on Zulip):

I think there's a tendency to get a huge amount of syntax errors when editing a use line (if it doesn't have balanced braces), and emacs (especially with the old JSON parser) does not deal well with that

Jonas Schievink (Jul 15 2020 at 14:06, on Zulip):

I wonder if better error recovery would be possible in use items, having the entire editor light up when editing imports seems suboptimal

Laurențiu Nicola (Jul 15 2020 at 14:06, on Zulip):

That was https://github.com/rust-analyzer/rust-analyzer/issues/3434, should be fixed in the latest version

Jake Goulding (Jul 15 2020 at 14:20, on Zulip):

Florian Diebold said:

I think there's a tendency to get a huge amount of syntax errors when editing a use line (if it doesn't have balanced braces), and emacs (especially with the old JSON parser) does not deal well with that

This was my gut suspicion, good to hear other people agree. I started to compile emacs 27 which has an improved parser, but got distracted.

Jake Goulding (Jul 15 2020 at 14:20, on Zulip):

always taking the first 500 errors

Although this may still be too many for emacs :-)

matklad (Jul 15 2020 at 14:23, on Zulip):

Although this may still be too many for emacs :-)

Capped it to 128 half an hour ago :)

Florian Diebold (Jul 15 2020 at 14:24, on Zulip):

I'm still using Emacs 26.3, the performance is not great :sad: but I don't really want to compile Emacs myself, I'm hoping it'll get released very soon now...

Jake Goulding (Jul 15 2020 at 14:39, on Zulip):

I was just going to use brew install --HEAD and see how that goes.

matklad (Jul 15 2020 at 14:52, on Zulip):

Unrelated, but have you tried semantic highlighting with Emacs?

matklad (Jul 15 2020 at 14:53, on Zulip):

It is the bit where I worry most about JSON parsing perf on the client-side

Last update: Sep 27 2020 at 13:15UTC