Skip to content
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

perf: add proxy cache to avoid the deserialize step #140

Merged
merged 3 commits into from
Dec 31, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
perf: add proxy cache to avoid the deserialize step
  • Loading branch information
yglsaltfish committed Dec 31, 2024
commit 4506993bf0caf731f2b37086dbcd110943cdb63a
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ aimrt:
- name: ros2_plugin
path: ./libaimrt_ros2_plugin.so
options:
node_name: example_ros2msg_echo_plugin
node_name: example_ros2msg_record_playback_plugin
executor_type: MultiThreaded # SingleThreaded/StaticSingleThreaded/MultiThreaded
executor_thread_num: 2
- name: record_playback_plugin
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/bash

source install/share/example_ros2/local_setup.bash

./aimrt_main --cfg_file_path=./cfg/examples_plugins_record_playback_plugin_record_ros2_imd_cfg.yaml
4 changes: 3 additions & 1 deletion src/plugins/proxy_plugin/proxy_plugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,9 @@ void ProxyPlugin::RegisterSubChannel() {
.topic_name = topic_meta.topic_name,
.pkg_path = type_support_wrapper.options.path,
.module_name = "core",
.msg_type_support_ref = type_support_wrapper.type_support_ref}};
.msg_type_support_ref = type_support_wrapper.type_support_ref},
.require_cache_serialization_types = {"pb", "ros2", "json", "yaml"}};

subscribe_wrapper.callback = [this, action_raw_ptr = proxy_action.get()](
MsgWrapper& msg_wrapper, std::function<void()>&& release_callback) {
if (msg_wrapper.msg_ptr == nullptr && msg_wrapper.serialization_cache.size() == 0) [[unlikely]] {
Expand Down