-
Notifications
You must be signed in to change notification settings - Fork 422
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
move vectors instantiated in wait_for_work to MemoryStrategy #116
Conversation
Seems reasonable to me, but I don't have time to try it right now. I'd recommend CI before merging. |
Is this necessary for the demo at ROSCon? If not I would suggest postponing it until Monday. |
CI: Windows is already done and looks good besides the connext_dynamic tests, so that's a good sign. |
The |
@@ -361,14 +361,14 @@ class Executor | |||
for (auto & weak_subscription : group->subscription_ptrs_) { | |||
auto subscription = weak_subscription.lock(); | |||
if (subscription) { | |||
subs.push_back(subscription); | |||
memory_strategy_->subs.push_back(subscription); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the MemoryStrategy
API would look clear if, instead of exposing the std::vector
directly, provide add_subscription
, add_service
, etc. and hide the underlying storage.
3f4a2b9
to
af9d641
Compare
move vectors instantiated in wait_for_work to MemoryStrategy
* fix cmake for test - remove unused params * set env variable for rmw_implementation
…ackage (ros2#48) * ros2GH-111 Add package for converter plugins * ros2GH-111 Add CDR converter plugin * ros2GH-111 Add test for more primitives types * ros2GH-116 Fix cdr converter after rebase on new converters interface * ros2GH-116 Use rmw_serialize/rmw_deserialize directly in converter and link against rmw_fastrtps_cpp * Fix converter package.xml * Fix clang warnings * ros2GH-30 Change interface to the same convention as rmw_(de)serialize * comply to new rcutils error handling API * use poco to load fastrtps * Update rosbag2_converter_default_plugins/src/rosbag2_converter_default_plugins/cdr/cdr_converter.cpp Co-Authored-By: Karsten1987 <[email protected]>
* ignore cast function type warning Signed-off-by: Karsten Knese <[email protected]> * use pragma to ignore warning on specific lines of code Signed-off-by: Karsten Knese <[email protected]> * correctly branch the pragma Signed-off-by: Karsten Knese <[email protected]>
This was done in my attempt to reduce pagefaults in Executor::spin. Several vectors that were being instantiated on the stack in Executor::spin have been moved into the MemoryStrategy, so that they can be preallocated (with
vector::reserve
) on construction.