diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-04-22 16:09:22 +0100 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-04-22 16:09:22 +0100 |
commit | 1705e5887d5c71cad846cb7e840b3c4e03942856 (patch) | |
tree | d1082112c172b8a7d20e72d02e9de8f60cfa5bc1 /crates/gen_lsp_server | |
parent | c416caeda2a09e84dc9cd201eff0bf04b701ae34 (diff) | |
parent | fccd0452299c8261e0298688d29e934b0fef1605 (diff) |
Merge #1195
1195: Add cached for SubtreeSource r=matklad a=edwin0cheng
I just did some simple profiling, the most slowest part of the mbe related code is the tree traversal, so i add a very simple cache in here is the result:
``` target\release\ra_cli analysis-stats```
*Before
```
Database loaded, 21 roots, 1.2731481s
Crates in this dir: 26
Total modules found: 282
Total declarations: 4783
Total functions: 3126
Total expressions: 59452
Expressions of unknown type: 8999 (15%)
Expressions of partially unknown type: 2672 (4%)
Analysis: 17.9596334s
```
```
*After
Database loaded, 21 roots, 1.7425901s
Crates in this dir: 26
Total modules found: 282
Total declarations: 4783
Total functions: 3126
Total expressions: 59452
Expressions of unknown type: 8999 (15%)
Expressions of partially unknown type: 2672 (4%)
Analysis: 13.4007118s
```
Save 4 seconds :)
Co-authored-by: Edwin Cheng <[email protected]>
Diffstat (limited to 'crates/gen_lsp_server')
0 files changed, 0 insertions, 0 deletions