diff options
author | Aleksey Kladov <[email protected]> | 2019-05-30 07:51:25 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-05-30 08:06:02 +0100 |
commit | 0ee5bd16c9e92b3a17a8f5cc79b0cb6a44ef8a10 (patch) | |
tree | 2cb254aa6164b722bdc556bb79f18f71b92e9211 /crates/ra_lsp_server/src/caps.rs | |
parent | 8c3cd8f121d4306732423d1c8804d54e36bd706a (diff) |
cancel salsa's validation
This small fix should improve rust-analyzer resopnsivness for
real-time operations like onEnter handling.
Turns out, salsa's validation can take hundreds of milliseconds, and,
in case no changes were made, it won't be triggering any queries.
Because we check for cancellation in queries, that means that
validation is not cancellable!
What this PR does is injecting check_canceled checks into validation,
by using salsa's event API, which wasn't meant to be used like this,
but, hey, it works!
Here's the onEnter handling before and after this change:
https://youtu.be/7-ffPzgvH7o
Diffstat (limited to 'crates/ra_lsp_server/src/caps.rs')
0 files changed, 0 insertions, 0 deletions