Stream: t-compiler/rust-analyzer

Topic: startup time

Bastien Orivel (Apr 26 2020 at 12:07, on Zulip):

Hey, I'm using vim with coc-rust-analyzer and while it works pretty well the startup time is a pretty big problem. My workflow involves a lot of quitting/reopening vim which makes rust-analyze start from scratch every time. Is there any work in progress to get better starting time or caching ?

Laurențiu (Apr 26 2020 at 12:10, on Zulip):

If you read the code for a while before invoking any rust-analyzer commands, (merged yesterday) will help a little. But there's no support for persisting the database.

Bastien Orivel (Apr 26 2020 at 12:11, on Zulip):

Well it seems to re run cargo check every time. Is that expected ?

Laurențiu (Apr 26 2020 at 12:12, on Zulip):

Yes by default, but it should be fast if there are no modifications.

matklad (Apr 26 2020 at 12:12, on Zulip):

There's no immediate work on this.

Althogh, I wonder if something can be done on the editor's side? One of the ideas behind LSP is that you have a persistent process.

Laurențiu (Apr 26 2020 at 12:13, on Zulip):

The best workaround for now would be to keep vim running and use a file picker or :open.

Bastien Orivel (Apr 26 2020 at 12:14, on Zulip):

I used to keep vim open but my workflow was ^Z fix error, if fixed open new vim with next error else do fg. I ended up with stuff like (I think that was when I updated bitflags in servo). I stopped doing that after setting up r-a because it ate my RAM.

Bastien Orivel (Apr 26 2020 at 12:15, on Zulip):

I guess I could just start r-a manually and modify the extension to connect to it ?

Bastien Orivel (Apr 26 2020 at 12:16, on Zulip):

(And yes my workflow is dumb, but muscle memory is strong...)

matklad (Apr 26 2020 at 12:21, on Zulip):

I don't think these necessary needs a change of workflow. Ideally, you have the same workflow, but the editor reuses servers

Bastien Orivel (Apr 26 2020 at 12:22, on Zulip):

Time to learn typescript then :rofl:

Bastien Orivel (May 04 2020 at 12:44, on Zulip):

Has something changed recently ? It stopped doing full cargo check on startup !

Last update: Jul 29 2021 at 08:30UTC