Skip to content

Commit d92a15c

Browse files
bors[bot]matklad
andauthored
Merge #2943
2943: Re-sync queries for memory usage measurnment r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
2 parents b67f695 + f1720d7 commit d92a15c

File tree

2 files changed

+53
-20
lines changed

2 files changed

+53
-20
lines changed

crates/ra_hir/src/db.rs

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,24 @@
11
//! FIXME: write short doc here
22
33
pub use hir_def::db::{
4-
BodyQuery, BodyWithSourceMapQuery, ComputeCrateDefMapQuery, ConstDataQuery,
4+
AttrsQuery, BodyQuery, BodyWithSourceMapQuery, ComputeCrateDefMapQuery, ConstDataQuery,
55
CrateLangItemsQuery, DefDatabase, DefDatabaseStorage, DocumentationQuery, EnumDataQuery,
6-
ExprScopesQuery, FunctionDataQuery, GenericParamsQuery, ImplDataQuery, InternDatabase,
7-
InternDatabaseStorage, LangItemQuery, ModuleLangItemsQuery, RawItemsQuery, StaticDataQuery,
8-
StructDataQuery, TraitDataQuery, TypeAliasDataQuery,
6+
ExprScopesQuery, FunctionDataQuery, GenericParamsQuery, ImplDataQuery, InternConstQuery,
7+
InternDatabase, InternDatabaseStorage, InternEnumQuery, InternFunctionQuery, InternImplQuery,
8+
InternStaticQuery, InternStructQuery, InternTraitQuery, InternTypeAliasQuery, InternUnionQuery,
9+
LangItemQuery, ModuleLangItemsQuery, RawItemsQuery, StaticDataQuery, StructDataQuery,
10+
TraitDataQuery, TypeAliasDataQuery, UnionDataQuery,
911
};
1012
pub use hir_expand::db::{
11-
AstDatabase, AstDatabaseStorage, AstIdMapQuery, MacroArgQuery, MacroDefQuery, MacroExpandQuery,
12-
ParseMacroQuery,
13+
AstDatabase, AstDatabaseStorage, AstIdMapQuery, InternMacroQuery, MacroArgQuery, MacroDefQuery,
14+
MacroExpandQuery, ParseMacroQuery,
1315
};
1416
pub use hir_ty::db::{
15-
AssociatedTyDataQuery, CallableItemSignatureQuery, DoInferQuery, FieldTypesQuery,
16-
GenericDefaultsQuery, GenericPredicatesQuery, HirDatabase, HirDatabaseStorage, ImplDatumQuery,
17-
ImplsForTraitQuery, ImplsInCrateQuery, StructDatumQuery, TraitDatumQuery, TraitSolveQuery,
17+
AssociatedTyDataQuery, AssociatedTyValueQuery, CallableItemSignatureQuery, DoInferQuery,
18+
FieldTypesQuery, GenericDefaultsQuery, GenericPredicatesForParamQuery, GenericPredicatesQuery,
19+
HirDatabase, HirDatabaseStorage, ImplDatumQuery, ImplSelfTyQuery, ImplTraitQuery,
20+
ImplsForTraitQuery, ImplsInCrateQuery, InternAssocTyValueQuery, InternChalkImplQuery,
21+
InternTypeCtorQuery, StructDatumQuery, TraitDatumQuery, TraitSolveQuery, TraitSolverQuery,
1822
TyQuery, ValueTyQuery,
1923
};
2024

crates/ra_ide/src/change.rs

Lines changed: 40 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -301,45 +301,74 @@ impl RootDatabase {
301301
)*}
302302
}
303303
sweep_each_query![
304+
// SourceDatabase
304305
ra_db::ParseQuery
305306
ra_db::SourceRootCratesQuery
307+
308+
// AstDatabase
306309
hir::db::AstIdMapQuery
307-
hir::db::ParseMacroQuery
308-
hir::db::MacroDefQuery
310+
hir::db::InternMacroQuery
309311
hir::db::MacroArgQuery
312+
hir::db::MacroDefQuery
313+
hir::db::ParseMacroQuery
310314
hir::db::MacroExpandQuery
315+
316+
// DefDatabase
317+
hir::db::RawItemsQuery
318+
hir::db::ComputeCrateDefMapQuery
311319
hir::db::StructDataQuery
320+
hir::db::UnionDataQuery
312321
hir::db::EnumDataQuery
322+
hir::db::ImplDataQuery
313323
hir::db::TraitDataQuery
314-
hir::db::RawItemsQuery
315-
hir::db::ComputeCrateDefMapQuery
316-
hir::db::GenericParamsQuery
317-
hir::db::FunctionDataQuery
318324
hir::db::TypeAliasDataQuery
325+
hir::db::FunctionDataQuery
319326
hir::db::ConstDataQuery
320327
hir::db::StaticDataQuery
328+
hir::db::BodyWithSourceMapQuery
329+
hir::db::BodyQuery
330+
hir::db::ExprScopesQuery
331+
hir::db::GenericParamsQuery
332+
hir::db::AttrsQuery
321333
hir::db::ModuleLangItemsQuery
322334
hir::db::CrateLangItemsQuery
323335
hir::db::LangItemQuery
324336
hir::db::DocumentationQuery
325-
hir::db::ExprScopesQuery
337+
338+
// InternDatabase
339+
hir::db::InternFunctionQuery
340+
hir::db::InternStructQuery
341+
hir::db::InternUnionQuery
342+
hir::db::InternEnumQuery
343+
hir::db::InternConstQuery
344+
hir::db::InternStaticQuery
345+
hir::db::InternTraitQuery
346+
hir::db::InternTypeAliasQuery
347+
hir::db::InternImplQuery
348+
349+
// HirDatabase
326350
hir::db::DoInferQuery
327351
hir::db::TyQuery
328352
hir::db::ValueTyQuery
353+
hir::db::ImplSelfTyQuery
354+
hir::db::ImplTraitQuery
329355
hir::db::FieldTypesQuery
330356
hir::db::CallableItemSignatureQuery
357+
hir::db::GenericPredicatesForParamQuery
331358
hir::db::GenericPredicatesQuery
332359
hir::db::GenericDefaultsQuery
333-
hir::db::BodyWithSourceMapQuery
334-
hir::db::BodyQuery
335360
hir::db::ImplsInCrateQuery
336361
hir::db::ImplsForTraitQuery
362+
hir::db::TraitSolverQuery
363+
hir::db::InternTypeCtorQuery
364+
hir::db::InternChalkImplQuery
365+
hir::db::InternAssocTyValueQuery
337366
hir::db::AssociatedTyDataQuery
367+
hir::db::AssociatedTyValueQuery
368+
hir::db::TraitSolveQuery
338369
hir::db::TraitDatumQuery
339370
hir::db::StructDatumQuery
340371
hir::db::ImplDatumQuery
341-
hir::db::ImplDataQuery
342-
hir::db::TraitSolveQuery
343372
];
344373
acc.sort_by_key(|it| std::cmp::Reverse(it.1));
345374
acc

0 commit comments

Comments
 (0)