Skip to content

Performance improvements in serialization (backport #553)#555

Open
mergify[bot] wants to merge 1 commit intokiltedfrom
mergify/bp/kilted/pr-553
Open

Performance improvements in serialization (backport #553)#555
mergify[bot] wants to merge 1 commit intokiltedfrom
mergify/bp/kilted/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: #555
Gist: https://gist.githubusercontent.com/jmachowinski/8ecf2302eaeb8874c5250461be6a90f0/raw/5cdae6edc4bc6adb345895249801d3c9ab97b1c2/ros2.repos
BUILD args:
TEST args:
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/18258

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

@jmachowinski
Copy link
Contributor

jmachowinski commented Feb 19, 2026

Pulls: #555
Gist: https://gist.githubusercontent.com/jmachowinski/bfc7887898db0b9fa1da6af4d9b5b7f8/raw/36845646be6861397566c5fec8e818617d6fb434/ros2.repos
BUILD args:
TEST args:
ROS Distro: kilted
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/18261

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

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.

3 participants