Open stepancheg opened 6 years ago
Group by
You want an additional flag that will merge generic methods and traits? The data required for such merging doesn't even parsed now, so it will take some time to implement.
Filtering
I'm using grep for this at the moment. But yes, the current filter doesn't sum up the filtered data.
You want an additional flag that will merge generic methods and traits?
Yes, an additional flag that will merge all instantiations all generic functions/methods together.
E. g.
HashMap<K, V>::new
together to key std::collections::hash::map::HashMap::new
Vec<T>::extend::<I>
together to key core::iter::traits::Extend::extend
The data required for such merging doesn't even parsed now, so it will take some time to implement.
OK. I can try to implement it.
Filtering I'm using grep for this at the moment. But yes, the current filter doesn't sum up the filtered data.
Like cargo bloat -n 9999999999 | grep re | head -20
? That works, but having a flag is probably slightly more convenient.
I can try to implement it.
Well, basically I need a Rust symbol parser. And such a library doesn't exist at the moment. I planned to write it myself, but I don't have enough time.
-n 9999999999
You can use -n 0
.
Filtering was added in the v0.5
Group by
Currently
cargo bloat
support grouping by:I think it would be helpful it
cargo bloat
could also group by:I think that's important because I have lots of symbols like:
It would be useful to sum all
protobuf::core::Message::merge_from
functions and find next largest generic bloated function.Filtering
Currenly
cargo bloat
supports filtering by crate.I might be helpful to:
Find all symbols containing substring
FieldDescriptorProto
, display top 20 of them, display size sum of all symbols, and total size as usual.