Skip to content

Conversation

k1832
Copy link

@k1832 k1832 commented Oct 14, 2025

Description

Motivation and change details

The previous method for aggregating debug markers involved iterating and pushing each marker, causing an unnecessary deep copy for every single one.

This change uses std::make_move_iterator to move the entire block of markers from each scene_module at once, eliminating the performance cost of copying. The behavior should remain the same.

Performance analysis

A performance analysis was done by using the lane driving scenario in the Autoware tutorial as well as the sample map data also mentioned in the tutorial.

For each performance measurement, I placed the initial pose and the goal at the exact same positions using Python script, then measured how long each execution of modifyPathVelocity took using the debug topic /planning/scenario_planning/lane_driving/behavior_planning/behavior_velocity_planner/debug/intersection/processing_time_ms.

Measurements were performed 3 times, both before and after this change. The resulting improvement is shown below:

Metric Before After Change
Runs 3 3  
Avg (ms) 13.480 13.061 -3.11%
Max (ms) 26.224 23.031 -12.18%
Min (ms) 0.066 0.049  
Std Dev 3.977 3.843  

Related links

None

How was this PR tested?

  • Performance: The test method/result are shown above.
  • Feature: The debug information on UI stayed unchanged before/after this change.

Notes for reviewers

None.

Interface changes

None.

Effects on system behavior

None.

Copy link

github-actions bot commented Oct 14, 2025

Thank you for contributing to the Autoware project!

🚧 If your pull request is in progress, switch it to draft mode.

Please ensure:

@k1832 k1832 changed the title chore(behavior_velocity_planner): Remove unnecessary data copy Chore(behavior_velocity_planner): Remove unnecessary data copy Oct 14, 2025
@k1832 k1832 changed the title Chore(behavior_velocity_planner): Remove unnecessary data copy chore(behavior_velocity_planner): Remove unnecessary data copy Oct 14, 2025
@k1832 k1832 changed the title chore(behavior_velocity_planner): Remove unnecessary data copy chore(behavior_velocity_planner): remove unnecessary data copy Oct 14, 2025
@k1832 k1832 marked this pull request as ready for review October 15, 2025 07:15
Copy link
Contributor

@shmpwk shmpwk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I confirmed module_markers is the temporal object and is not used anymore.

@shmpwk shmpwk added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Oct 15, 2025
Copy link

codecov bot commented Oct 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 50.67%. Comparing base (ea11a93) to head (ea8f17e).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #672      +/-   ##
==========================================
- Coverage   51.10%   50.67%   -0.44%     
==========================================
  Files         325      325              
  Lines       21453    23355    +1902     
  Branches     9322    10051     +729     
==========================================
+ Hits        10964    11835     +871     
- Misses       9538    10545    +1007     
- Partials      951      975      +24     
Flag Coverage Δ *Carryforward flag
differential 33.53% <100.00%> (?)
total 51.11% <ø> (+<0.01%) ⬆️ Carriedforward from ea11a93

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants