Skip to content

Conversation

@kiljacken
Copy link
Contributor

@matklad mentioned this might be a good idea.

So the general idea is that we don't really need the lock, as we can
just clone the check watcher state when creating a snapshot. We can then
use Arc::get_mut to get mutable access to the state from WorldState
when needed.

Running with this it seems to improve responsiveness a bit while cargo
is running, but I have no hard numbers to prove it. In any case, a
serialization point less is always better when we're trying to be
responsive.

@matklad mentioned this might be a good idea.

So the general idea is that we don't really need the lock, as we can
just clone the check watcher state when creating a snapshot. We can then
use `Arc::get_mut` to get mutable access to the state from `WorldState`
when needed.

Running with this it seems to improve responsiveness a bit while cargo
is running, but I have no hard numbers to prove it. In any case, a
serialization point less is always better when we're trying to be
responsive.
@matklad
Copy link
Contributor

matklad commented Jan 23, 2020

bors try

bors bot added a commit that referenced this pull request Jan 23, 2020
@matklad
Copy link
Contributor

matklad commented Jan 23, 2020

Didn't magically fix the windows issue ;-(

bors r+

bors bot added a commit that referenced this pull request Jan 23, 2020
2898: Remove RWLock from check watcher. r=matklad a=kiljacken

@matklad mentioned this might be a good idea.

So the general idea is that we don't really need the lock, as we can
just clone the check watcher state when creating a snapshot. We can then
use `Arc::get_mut` to get mutable access to the state from `WorldState`
when needed.

Running with this it seems to improve responsiveness a bit while cargo
is running, but I have no hard numbers to prove it. In any case, a
serialization point less is always better when we're trying to be
responsive.

Co-authored-by: Emil Lauridsen <mine809@gmail.com>
@bors
Copy link
Contributor

bors bot commented Jan 23, 2020

Build succeeded

  • Rust (macos-latest)
  • Rust (ubuntu-latest)
  • TypeScript

@bors bors bot merged commit 05aa5b8 into rust-lang:master Jan 23, 2020
@bors
Copy link
Contributor

bors bot commented Jan 23, 2020

try

Build succeeded

  • Rust (macos-latest)
  • Rust (ubuntu-latest)
  • TypeScript

@bors
Copy link
Contributor

bors bot commented Jan 23, 2020

try

Timed out

@kiljacken kiljacken deleted the lock-removal branch January 24, 2020 08:24
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.

2 participants