ros-infrastructure/rospkg — pull request #72 by aballier (2014-12-23 11:33:05+00:00)
Title: Add support for rospack_norecurse to avoid recursing into all subdirecto...

...ries when looking for a package.

I am installing ros into /usr, hence this searches in /usr/share. I have a lot of directories, not ROS related, into /usr/share (e.g. a full TeX Live install), and I get these timings:

Without rospack_norecurse in /usr/share:
$ time rosversion rospack
2.2.5

real 0m2.861s
user 0m1.588s
sys 0m1.267s

With rospack_norecurse in /usr/share:
$ time rosversion rospack
2.2.5

real 0m0.135s
user 0m0.100s
sys 0m0.034s

This is on a desktop with a SSD drive. On an arm board, with much less packages in /usr/share but way much slower I/O I remember hitting the 10 seconds timeout for roscore to start.