Skip to content

Performance improvements in serialization (backport #553)#554

Merged
jmachowinski merged 1 commit intojazzyfrom
mergify/bp/jazzy/pr-553
Feb 20, 2026
Merged

Performance improvements in serialization (backport #553)#554
jmachowinski merged 1 commit intojazzyfrom
mergify/bp/jazzy/pr-553

Conversation

@mergify
Copy link

@mergify mergify bot commented Feb 19, 2026

Description

Optimized functions that showed up in perf

Did you use Generative AI?

No


This is an automatic backport of pull request #553 done by [Mergify](https://mergify.com).

* perf: Fixed high CPU usage due to dynamic_cast

The dynamic_cast here turned out to be quite costly. Replacing
it by the variant like function, we see a ~10% cpu usage reduction
in our use case.

Signed-off-by: Janosch Machowinski <J.Machowinski@cellumation.com>

* perf: Replaced virtual functions by templates

This gives another performance improvement of around 2% of cpu
usage in our usage scenario.

Signed-off-by: Janosch Machowinski <J.Machowinski@cellumation.com>

---------

Signed-off-by: Janosch Machowinski <J.Machowinski@cellumation.com>
Co-authored-by: Janosch Machowinski <J.Machowinski@cellumation.com>
(cherry picked from commit 5147e01)
@jmachowinski
Copy link
Contributor

Pulls: #554
Gist: https://gist.githubusercontent.com/jmachowinski/891fbe48adc5772ad2f98903257abc6b/raw/1e44eac8dba3439b5ab43f010238ab3d7d2dfbd4/ros2.repos
BUILD args:
TEST args:
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/18259

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

@jmachowinski
Copy link
Contributor

jmachowinski commented Feb 19, 2026

Pulls: #554
Gist: https://gist.githubusercontent.com/jmachowinski/573adb71dc45fb6dd101c1eac09c69aa/raw/477143db29e49c696ffb26d8e70ed18f01005186/ros2.repos
BUILD args:
TEST args:
ROS Distro: jazzy
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/18260

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

@jmachowinski jmachowinski merged commit 7cd457d into jazzy Feb 20, 2026
2 checks passed
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.

2 participants