Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to fork of serde_rosmsg #201

Merged
merged 3 commits into from
Oct 17, 2024
Merged

Switch to fork of serde_rosmsg #201

merged 3 commits into from
Oct 17, 2024

Conversation

Carter12s
Copy link
Collaborator

@Carter12s Carter12s commented Oct 17, 2024

Description

  • Discovered that serde_rosmsg was quite slow on uint8[] -> Vec deserialization
  • Figured out how to make it MUCH faster: 97% Faster Image Parsing adnanademovic/serde_rosmsg#5
  • Switched to our own fork of serde_rosmsg to enable to optimization
  • Updated codegen to generate types that take advantage of optimization via serde_bytes
  • Added criterion based benchmarking to validate speedup (and to start adding performance testing in general):

This resulted in a 71% speedup on sending 1080p color images, from 22ms to 6.3ms.

Running benches/image_bench.rs (target/release/deps/image_bench-3e2fda80b1f23a8a)
Gnuplot not found, using plotters backend
image_bench             time:   [6.2894 ms 6.3457 ms 6.4039 ms]
                        change: [-71.261% -71.004% -70.693%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 3 outliers among 100 measurements (3.00%)
  3 (3.00%) high mild

image

Benchmarking is not fixtured in CI yet. Results obtained on a AMD Ryzen 9 4900HS

Fixes

Closes: number

Checklist

  • Update CHANGELOG.md

@Carter12s Carter12s merged commit 80d3615 into master Oct 17, 2024
5 checks passed
@Carter12s
Copy link
Collaborator Author

flamegraph
Leaving this here for future self.

This is a 5 second profile run of the image send / recv bench mark. Looking at where performance can still be gained.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant