mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Auto merge of #16335 - lnicola:salsa-lz4-file-text, r=Veykril
internal: Compress file text using LZ4 I haven't tested properly, but this roughly looks like: ``` 1246 MB 59mb 4899 FileTextQuery 1008 MB 20mb 4899 CompressedFileTextQuery 555kb 1790 FileTextQuery ``` We might want to test on something more interesting, like `bevy`.
This commit is contained in:
commit
8f8bcfc131
16 changed files with 89 additions and 36 deletions
|
@ -361,8 +361,8 @@ fn load_crate_graph(
|
|||
let changes = vfs.take_changes();
|
||||
for file in changes {
|
||||
if let vfs::Change::Create(v) | vfs::Change::Modify(v) = file.change {
|
||||
if let Ok(text) = std::str::from_utf8(&v) {
|
||||
analysis_change.change_file(file.file_id, Some(text.into()))
|
||||
if let Ok(text) = String::from_utf8(v) {
|
||||
analysis_change.change_file(file.file_id, Some(text))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue