You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Another issue that I'm experimenting is a websocket Handle bottleneck due to the json message conversion to eprosima xtypes by the integration service. This is happening with Compressed images.
This seems to happen only when you are using the websocket handle, at least what i have been tested
I have added some time measurement to the convert__msg.cpp.em template to show the duration between each received frame,
void subscription_callback(
const Ros2_Msg& msg)
{
auto start = std::chrono::steady_clock::now();
logger << utils::Logger::Level::INFO
<< "Receiving message from ROS 2 for topic '" << _topic_name << "'"
<< "time from last frame: " << std::chrono::duration_cast<std::chrono::milliseconds>(start - t_last).count() << "ms "
<< std::endl;
xtypes::DynamicData data(_message_type);
convert_to_xtype(msg, data);
//logger << utils::Logger::Level::INFO
//<< "Received message: [[ " << data << " ]]" << std::endl;
//<< "Received message: [[ " " ]]" << std::endl; // change to this to avoid data printing
(*_callback)(data, nullptr);
t_last = start;
}
For example the integration service is able to connect to the ROS2 topics with almost good processing time through a WIFI connection,
But when I get connected from a webpage using roslibjs through a WIFI connection, an increase of 10X processing time is introduced,
the video reception on the web is going very slow around 1-2 fps
You can check the difference after connecting from the image below,
I perform some profiling and the issue seems to be related with the message conversion on convert_to_xtype(msg, data);
The text was updated successfully, but these errors were encountered:
gedeon1976
changed the title
**websocket Handle bottleneck** due to the json message conversion to **eprosima xtypes** by the integration service
websocket Handle bottleneck due to the json message conversion to eprosima xtypes by the integration service
Jan 8, 2022
Another issue that I'm experimenting is a websocket Handle bottleneck due to the json message conversion to eprosima xtypes by the integration service. This is happening with Compressed images.
This seems to happen only when you are using the websocket handle, at least what i have been tested
I have added some time measurement to the convert__msg.cpp.em template to show the duration between each received frame,
and added the next variable to the class
std::chrono::time_point<std::chrono::steady_clock> t_last;
For example the integration service is able to connect to the ROS2 topics with almost good processing time through a WIFI connection,
But when I get connected from a webpage using roslibjs through a WIFI connection, an increase of 10X processing time is introduced,
the video reception on the web is going very slow around 1-2 fps
You can check the difference after connecting from the image below,
I perform some profiling and the issue seems to be related with the message conversion on convert_to_xtype(msg, data);
From profiling also we have,
The following functions spent a lot of time!!
So, I'm not sure if somebody from eProsima can check this behavior when using Websocket-SH handler?
Originally posted by @gedeon1976 in #169 (comment)
The text was updated successfully, but these errors were encountered: