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:
bors 2024-03-11 13:43:33 +00:00
commit 8f8bcfc131
16 changed files with 89 additions and 36 deletions

View file

@ -12,7 +12,7 @@ mod traits;
use std::env;
use base_db::{FileRange, SourceDatabaseExt};
use base_db::{FileRange, SourceDatabaseExt2 as _};
use expect_test::Expect;
use hir_def::{
body::{Body, BodySourceMap, SyntheticSyntax},
@ -584,7 +584,7 @@ fn salsa_bug() {
}
";
db.set_file_text(pos.file_id, Arc::from(new_text));
db.set_file_text(pos.file_id, new_text);
let module = db.module_for_file(pos.file_id);
let crate_def_map = module.def_map(&db);