Skip to content

Coalesce prime_caches updates #6441

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 2, 2020
Merged

Coalesce prime_caches updates #6441

merged 2 commits into from
Nov 2, 2020

Conversation

jonas-schievink
Copy link
Contributor

This reduces the number of progress bar updates we send to the client by collapsing subsequent updates into one. This doesn't work as well as I'd hoped (which is that we end up sending no updates, or only start and end, when the cache is already fresh), but it does reduce the number considerably: instead of ~720 updates on the rust-analyzer codebase, we now only send ~60.

It uses the same approach that is already in use for coalescing VFS events.

Hopefully this is enough to fix #6413.

@matklad
Copy link
Member

matklad commented Nov 2, 2020

bors r+

@bors
Copy link
Contributor

bors bot commented Nov 2, 2020

@bors bors bot merged commit eb4e84f into rust-lang:master Nov 2, 2020
@jiacai2050
Copy link

jiacai2050 commented Nov 4, 2020

In case of anyone build ra with rust 1.47.0, and have this error:

LSP :: rust-analyzer failed to load workspace: Failed to find sysroot for Cargo.toml file ~/rust/playground/at-2020-11-03-174822/Cargo.toml. Is rust-src installed?: could not find libcore in sysroot path `~/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/src` (`RUST_SRC_PATH` might be incorrect, try unsetting it)

check this issue racer-rust/emacs-racer#138

@jonas-schievink jonas-schievink deleted the cooler-caches branch November 4, 2020 11:53
@jiacai2050
Copy link

@jonas-schievink After build ra with latest commit (7c94f1c), performance is much better than release 2020-11-02 , but still a little slower than previous version(I don't have exact number since ra is replaced 😞 ) .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Perf regression: r-a can't keep up with editing
3 participants