mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 14:51:48 +00:00
use salsa's LRU for syntax trees
This commit is contained in:
parent
80aa9d5f9f
commit
fc2658b074
5 changed files with 11 additions and 7 deletions
|
@ -5,7 +5,7 @@ use std::{
|
|||
|
||||
use ra_db::{
|
||||
CheckCanceled, FileId, Canceled, SourceDatabase,
|
||||
salsa,
|
||||
salsa::{self, Database},
|
||||
};
|
||||
|
||||
use crate::{LineIndex, symbol_index::{self, SymbolsDatabase}};
|
||||
|
@ -49,6 +49,8 @@ impl Default for RootDatabase {
|
|||
db.set_crate_graph(Default::default());
|
||||
db.set_local_roots(Default::default());
|
||||
db.set_library_roots(Default::default());
|
||||
db.query_mut(ra_db::ParseQuery).set_lru_capacity(128);
|
||||
db.query_mut(hir::db::ParseMacroQuery).set_lru_capacity(128);
|
||||
db
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue