RobotWebTools / rclnodejs

Node.js version of ROS 2.0 client
https://docs.ros.org/en/humble/Concepts/Basic/About-Client-Libraries.html?highlight=rclnodejs#community-maintained
Apache License 2.0
316 stars 70 forks source link

find ros packages from ament index #746

Closed koonpeng closed 3 years ago

koonpeng commented 3 years ago

When in a path that has ament executed, use the ament index to obtain a list of ros definition files instead of recursively scanning the directory.

This improves the message generation speed, on my pc, i get

old find packages

real    0m6.069s
user    0m13.387s
sys     0m3.757s

using ament index

real    0m2.189s
user    0m13.449s
sys     0m3.722s
minggangw commented 3 years ago

Wow, that accelerates a lot!

coveralls commented 3 years ago

Coverage Status

Coverage remained the same at 91.268% when pulling 0a62ecfba0cd611ff99b5fba6843d5024e32546b on get-packages-from-ament-index into ba3b0191471cd3fc3e87de7ef8cffa99f803b1c7 on develop.