Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Performance issue of rls on large code base #1410

@liufuyang

Description

@liufuyang

It seems rls runs very slow for some large code base and it makes the development with it somehow unpleasant.

For example, you can try use rls with vscode to develop code on a project such as tikv. I am not sure whether it would be related to which specific code file but here for example I am editing this line on this file:
https://github.com/tikv/tikv/blob/master/src/server/status_server.rs#L45,
where I can remove the ; behind build() to trigger a compile error, and writing it back to see the error goes away.

The timing I got on my machine:

  • removing ; to show error, it takes more than 40 second
  • adding ; back to see error goes away, it takes around 1 minute and 20 seconds

And during the waiting for rls to give results, I could see from my activity monitor that it seems like a single core was 100% usage all the time.

While if I just use a normal editor, do the same changes and use cargo check to check compile errors, it only takes 10 to 20 seconds for cargo check to finish.

Is there anyway to make rls gives back compile results faster? 🤔

@nrc @jonathandturner

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions