aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_db
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-06-12 11:36:47 +0100
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-06-12 11:36:47 +0100
commit03645c55761f8c9345ee3837a6010e65e7a80179 (patch)
tree9c24cb112429b0334762063e71a65a1907386e59 /crates/ra_db
parent6296f51678843c96a4ab1f1e6784b6d69222e072 (diff)
parentfed52706def9a9f5d33edc7dd9848a02ae475ba5 (diff)
Merge #1382
1382: use salsa's LRU for syntax trees r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_db')
-rw-r--r--crates/ra_db/Cargo.toml2
-rw-r--r--crates/ra_db/src/lib.rs2
2 files changed, 3 insertions, 1 deletions
diff --git a/crates/ra_db/Cargo.toml b/crates/ra_db/Cargo.toml
index 827855b2f..f73dd739a 100644
--- a/crates/ra_db/Cargo.toml
+++ b/crates/ra_db/Cargo.toml
@@ -5,7 +5,7 @@ version = "0.1.0"
5authors = ["rust-analyzer developers"] 5authors = ["rust-analyzer developers"]
6 6
7[dependencies] 7[dependencies]
8salsa = "0.12.1" 8salsa = "0.12.3"
9relative-path = "0.4.0" 9relative-path = "0.4.0"
10rustc-hash = "1.0" 10rustc-hash = "1.0"
11 11
diff --git a/crates/ra_db/src/lib.rs b/crates/ra_db/src/lib.rs
index 7c49c585b..f08616100 100644
--- a/crates/ra_db/src/lib.rs
+++ b/crates/ra_db/src/lib.rs
@@ -65,6 +65,8 @@ pub struct FileRange {
65 pub range: TextRange, 65 pub range: TextRange,
66} 66}
67 67
68pub const DEFAULT_LRU_CAP: usize = 128;
69
68/// Database which stores all significant input facts: source code and project 70/// Database which stores all significant input facts: source code and project
69/// model. Everything else in rust-analyzer is derived from these queries. 71/// model. Everything else in rust-analyzer is derived from these queries.
70#[salsa::query_group(SourceDatabaseStorage)] 72#[salsa::query_group(SourceDatabaseStorage)]