diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-06-26 17:35:22 +0100 |
---|---|---|
committer | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-06-26 17:35:22 +0100 |
commit | 203d5dd0d0092b505db9efcff377fea154cbfe11 (patch) | |
tree | 80400bb1dc37c38bc2ce920ba616600a0d8b868d /crates/ra_hir/src/ty/traits.rs | |
parent | 0cff7f84c64eb9e6524b0ecb27304b854d783ec1 (diff) | |
parent | a198d78bd1dafbfe78c597ff0deab17ac4d9092e (diff) |
Merge #1443
1443: cache chalk queries r=flodiebold a=matklad
This gives a significant speedup, because chalk will call these
functions several times even withing a single revision. The only
significant one here is `impl_data`, but I figured it might be good to
cache others just for consistency.
The results I get are:
Before:
from scratch: 16.081457952s
no change: 15.846493ms
trivial change: 352.95592ms
comment change: 361.998408ms
const change: 457.629212ms
After:
from scratch: 14.910610278s
no change: 14.934647ms
trivial change: 85.633023ms
comment change: 96.433023ms
const change: 171.543296ms
Seems like a nice win!
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/ty/traits.rs')
-rw-r--r-- | crates/ra_hir/src/ty/traits.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_hir/src/ty/traits.rs b/crates/ra_hir/src/ty/traits.rs index 9a6349d4b..69c03a36c 100644 --- a/crates/ra_hir/src/ty/traits.rs +++ b/crates/ra_hir/src/ty/traits.rs | |||
@@ -12,7 +12,7 @@ use super::{TraitRef, Ty, Canonical, ProjectionTy}; | |||
12 | 12 | ||
13 | use self::chalk::{ToChalk, from_chalk}; | 13 | use self::chalk::{ToChalk, from_chalk}; |
14 | 14 | ||
15 | mod chalk; | 15 | pub(crate) mod chalk; |
16 | 16 | ||
17 | pub(crate) type Solver = chalk_solve::Solver; | 17 | pub(crate) type Solver = chalk_solve::Solver; |
18 | 18 | ||