Unity-Technologies / ROS-TCP-Endpoint

ROS package used to create an endpoint to accept ROS messages sent from a Unity scene using the ROS TCP Connector scripts
Apache License 2.0
178 stars 118 forks source link

Improving the performance of the read_message by not splitting the da… #90

Closed P3TE closed 3 years ago

P3TE commented 3 years ago

Improving the performance read_message, see https://github.com/Unity-Technologies/ROS-TCP-Endpoint/issues/89

This is done by receiving the entire message all at once instead of reading 1024 byte chunks and stitching them together as you go.

Proposed change(s)

Describe the changes made in this PR.

Useful links (GitHub issues, JIRA tickets, forum threads, etc.)

Provide any relevant links here.

Types of change(s)

Testing and Verification

Test machine: i7 9700k, 32Gb ddr4 2133MHz ram. So before the change, it took between 3.5ms and 4.9ms to read a message of length 2764858 byes (24-bit 720p uncompressed image message) After the change, it took between 0.5ms and 1.1ms. Nice.

Test Configuration:

Checklist

Other comments