ros2 / ros2/rclcpp

Add support for a transaction window for adding subscriptions, clients, etc

Open
#2,151 1 comment 1 reaction 1 assignee View on GitHub

@mjcarroll is already working on this.

Since Apr 13, 2023.

backlog
Dominant language
C++
Stars
805
Forks
564
Avg merge
1d 17h
Merged PRs (30d)
27

Description

Feature request

Feature description

Currently, each time that a subscription, service, client or waitable is added to a node, it signals for the executor to rebuild the collection of entities that it is tracking as well as the underlying waitset.

One workaround is to set up all entities before adding the node or callback group to an executor, but in the case of the LifecycleNode pattern, the node is already added to an executor.

The idea here would be to add a begin_transaction and end_transaction function that would allow the user to temporarily disable notification of the executor, and resume after all entities have been added.

This would reduce a bit of the CPU churn seen when using LifecycleNodes with many subscriptions.

CC: @alsora @mauropasse

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.