[ty] Track heap usage of salsa structs#19790
Conversation
8186e3f to
cc02bf8
Compare
|
|
||
| for (query_fn, memo) in memos { | ||
| let size_of_fields = | ||
| memo.size_of_fields() + memo.heap_size_of_fields().unwrap_or(0); |
There was a problem hiding this comment.
Would be nice if there was a total_size_of_fields helper.
Diagnostic diff on typing conformance testsNo changes detected when running ty on typing conformance tests ✅ |
|
cc02bf8 to
6b7d931
Compare
|
MichaReiser
left a comment
There was a problem hiding this comment.
Thank you, this is great.
Did you run ty on any large project with memory reporting enabled? Any interesting (large structs) finds?
There was a problem hiding this comment.
Unrelated to your changes: Would it make sense for the CI job to show something closer to FULL (while still bucketing the numbers)? I find the current output a good indicator but it isn't actionable because all I know is that memory usage increased or decreased. It might be more helpful if we can pin point the change to specific queries.
6879f08 to
810df06
Compare
810df06 to
5c389f7
Compare
|
I'll merge this because I think it will make @AlexWaygood's life a bit easier and I think all review feedback is addressed too (I just did a merge and added a few more get size implementations) |
* main: Don't cache files with diagnostics (#19869) [ty] support recursive type aliases (#19805) [ty] Remove unsafe `salsa::Update` implementations in `tuple.rs` (#19880) [ty] Function argument inlay hints (#19269) [ty] Remove Salsa interning for `TypedDictType` (#19879) Fix `lint.future-annotations` link (#19876) [ty] Reduce memory usage of `TupleSpec` and `TupleType` (#19872) [ty] Track heap usage of salsa structs (#19790) Update salsa to pull in tracked struct changes (#19843) [ty] simplify CycleDetector::visit signature (#19873) [ty] use interior mutability in type visitors (#19871) [ty] Fix tool name is None when no ty path is given in ty_benchmark (#19870) [ty] Remove `Type::Tuple` (#19669) [ty] Short circuit `ReachabilityConstraints::analyze_single` for dynamic types (#19867)
…aints * dcreager/inferrable: (65 commits) this was right after all mark typevars inferrable as we go fix tests fix inference of constrained typevars [ty] Add precise inference for indexing, slicing and unpacking `NamedTuple` instances (#19560) Add rule code to GitLab description (#19896) [ty] render docstrings in hover (#19882) [ty] simplify return type of place_from_declarations (#19884) [ty] Various minor cleanups to tuple internals (#19891) [ty] Improve `sys.version_info` special casing (#19894) Don't cache files with diagnostics (#19869) [ty] support recursive type aliases (#19805) [ty] Remove unsafe `salsa::Update` implementations in `tuple.rs` (#19880) [ty] Function argument inlay hints (#19269) [ty] Remove Salsa interning for `TypedDictType` (#19879) Fix `lint.future-annotations` link (#19876) [ty] Reduce memory usage of `TupleSpec` and `TupleType` (#19872) [ty] Track heap usage of salsa structs (#19790) Update salsa to pull in tracked struct changes (#19843) [ty] simplify CycleDetector::visit signature (#19873) ...
Summary
This is the last big remaining item for our Salsa memory reports.