[roslaunch] cache result of path finding for faster roslaunch behavior#676
Conversation
|
Can one of the admins verify this patch? |
2424fcc to
09d9fa1
Compare
There was a problem hiding this comment.
pkg and resource_name are not keyword arguments. Therefore please pass them as positional arguments.
There was a problem hiding this comment.
I think they are keyword arguments.
https://github.com/ros/ros/blob/jade-devel/core/roslib/src/roslib/packages.py#L463
and cached.py in this package supports both.
https://github.com/ros/ros_comm/pull/676/files#diff-66abf4062401099443c44fc29a06e40aR28
cached.find_resource(args[0], args[1])
cached.find_resource(pkg=args[0], resource_name=args[1])
There was a problem hiding this comment.
The change I made about the arguments are just a refactoring.
Using keyword arguments is good habit I think.
There was a problem hiding this comment.
You are passing the two standard arguments as if they were keyword arguments. Please pass them without the keyword instead.
09d9fa1 to
10e7bc2
Compare
|
I updated the commit, so please review again. |
555882e to
892245a
Compare
There was a problem hiding this comment.
Please avoid unrelated white space changes.
|
Beside the comment the PRs look good. the performance improvement is definitely notable when the launch file has several resources to look up. |
aaa7975 to
4fc55e9
Compare
|
I updated the commit following your comments. |
There was a problem hiding this comment.
Please move the import one line up to follow PEP8.
4fc55e9 to
293bf4c
Compare
|
I updated again. |
There was a problem hiding this comment.
Sorry for the late tiny feedback but some of it only appears when I open the code in my editor which does all kind of style checks.
Please change first word from Returns to Return (PEP257 D401).
Please add an empty line between this and the next line (PEP257 D205).
293bf4c to
72a9a91
Compare
|
I updated the commit. Please review again. |
|
Thanks for iterating on the patch. |
[roslaunch] cache result of path finding for faster roslaunch behavior
|
Thanks! 😄 |
|
awesome feature!! :) |
|
I reviewed the change again and think an alternative approach will be even better. Currently the already passed in rospack instance is supposed to do some caching. But for separate nodes new instances are created. The following patches revert the previous changes and ensure that a single rospack instance is used which also caches the additional package mapping information:
@wkentaro Can you please confirm that these changes also work in your scenario and that they improve performance even more? |
|
I have reverted the changes from this PR in favor of #682. |
[roslaunch] cache result of path finding for faster roslaunch behavior
This is for faster roslaunch's node launching.
Closes #541
Closes #542
This is firstly reported by @garaemon .