Replies: 6 comments 13 replies
-
Thank you for your issue! We don't have infrastructure for continuous profiling (open to contributions) so I couldn't say. I'd recommend running your program through Also generally it's not worth benchmarking debug builds, make sure you're benchmarking release builds with debuginfo. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the feedback, here are runs on release (with debug info) for both versions, flamegraph svgs enclosed. On 0.10.6: sudo flamegraph -- target/release/examples/my_test
dtrace: description 'profile-997 ' matched 1 probe
1000 iterations took : 6.907084ms On 0.11.0 sudo flamegraph -- target/release/examples/my_test
dtrace: description 'profile-997 ' matched 1 probe
1000 iterations took : 2.10861775s |
Beta Was this translation helpful? Give feedback.
-
If you look at the Decoder implementation the decode_sequence_of and decode_set_of" methods relies on parsing until an Error return from the decoder, hence the paths generating the backtraces is part of the "normal flow" As an example fn decode_sequence_of<D: Decode>(
&mut self,
tag: Tag,
_: Constraints,
) -> Result<Vec<D>, Self::Error> {
self.parse_constructed_contents(tag, true, |decoder| {
let mut items = Vec::new();
while let Ok(item) = D::decode(decoder) {
items.push(item);
}
Ok(items)
})
} my 5 cents |
Beta Was this translation helpful? Give feedback.
-
Released the patch that fixes the biggest issue. @Arnix If you don't mind, it would be great if you could post a new flame graph with 0.11.1 so that we can see what's taking up time with that. |
Beta Was this translation helpful? Give feedback.
-
sudo flamegraph -- target/release/examples/my_test
dtrace: description 'profile-997 ' matched 1 probe
1000 iterations took : 347.906083ms Here we go! |
Beta Was this translation helpful? Give feedback.
-
#197 should restore the performance completely for now. |
Beta Was this translation helpful? Give feedback.
-
First of all, thanks for your hard work. I have started on a project to handle incoming ASN.1 encoded CDRs for ingestion in a data lake. When upgrading to 0.11.0 the performance dropped like a stone.
To take away complexity, I made a small test based on the size_compare example:
Build and run this on 0.10.6 (debug build) yields the following result:
1000 iterations took : 115.877791ms
Build and run on 0.11.0 yields this:
1000 iterations took : 32.089247875s
Any help to point out if I am missing out on something or if something fundamental changed (for worse) is greatly appreciated.
Thanks
Arnix
Beta Was this translation helpful? Give feedback.
All reactions