diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-02-04 18:33:57 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2021-02-04 18:33:57 +0000 |
commit | 36191543a679d4e01c206d2e98a2d7ae170a25e2 (patch) | |
tree | 91431506bde2965c819030eea14433926b82310f /crates/test_utils/Cargo.toml | |
parent | 663d404a4ee52cf96e0de793e45290be1a43dcb5 (diff) | |
parent | 003ee0086ae424ec43ad14cd90af9cd5809a93c8 (diff) |
Merge #7557
7557: Intern `TypeRef`s in the containing `ItemTree` r=jonas-schievink a=jonas-schievink
This reduces the memory used by `ItemTreeQuery` by ~20%. As it turns out, `TypeRef` is very heavy, and is used a lot in `ItemTree`:
* Many types are frequently repeated throughout the same file. This is what this PR addresses by storing identical `TypeRef`s only once per `ItemTree`.
* The vast majority of `TypeRef` consist of a plain path with only a single element. "Type anchors" like in `<Ty>::func` are used incredibly rarely, and even multi-segment paths are much rarer than single-segment paths.
Co-authored-by: Jonas Schievink <[email protected]>
Diffstat (limited to 'crates/test_utils/Cargo.toml')
0 files changed, 0 insertions, 0 deletions