aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/syntax_highlighting/injection.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-06-20 23:14:21 +0100
committerGitHub <[email protected]>2020-06-20 23:14:21 +0100
commit04d64267de2c9ade61ae9fdbc98114599c11a2d7 (patch)
treeeb18414e177eb0e40e902c5ec45cebc49ac8d43b /crates/ra_ide/src/syntax_highlighting/injection.rs
parent92fef01f6506b33c0489e020df1ad9fdce2fac9b (diff)
parenta3c2f5126fb9f2575584d12335b6e7e82deec45a (diff)
Merge #4947
4947: Replace `impls_in_trait` query with smarter use of `CrateImplDefs` r=matklad a=jonas-schievink `impls_in_trait` was allocating a whopping ~400 MB of RAM when running analysis-stats on r-a itself. Remove it, instead adding a query that computes a summary `CrateImplDefs` map for all transitive dependencies. This can probably still be made more efficient, but this already reduces the peak memory usage by 25% without much performance impact on analysis-stats. **Before**: ``` Total: 34.962107188s, 2083mb allocated 2141mb resident 422mb ImplsForTraitQuery (deps) 250mb CrateDefMapQueryQuery 147mb MacroArgQuery 140mb TraitSolveQuery (deps) 68mb InferQueryQuery (deps) 62mb ImplDatumQuery (deps) ``` **After**: ``` Total: 35.261100358s, 1520mb allocated 1569mb resident 250mb CrateDefMapQueryQuery 147mb MacroArgQuery 144mb TraitSolveQuery (deps) 68mb InferQueryQuery (deps) 61mb ImplDatumQuery (deps) 45mb BodyQuery 45mb ImplDatumQuery ``` Co-authored-by: Jonas Schievink <[email protected]>
Diffstat (limited to 'crates/ra_ide/src/syntax_highlighting/injection.rs')
0 files changed, 0 insertions, 0 deletions