-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
speeding up of app load: 40 seconds -> 4 seconds #52
Conversation
dad4779
to
8e79346
Compare
I update this PR, and now it only takes 1 seconds to load the app definition. @708yamaguchi can you check this PR in your PC and report how fast it is? |
21d8d88
to
c2f8e2f
Compare
c2f8e2f
to
d3e1c6a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is very useful PR.
I have 619 ROS packages in my workspaces,
$ rospack list | wc -l
619
and I have 18 apps in 4 packages in my workspaces.
[INFO] [1640495997.563157]: 1 apps found in /home/leus/ros/melodic/src/jsk-ros-pkg/jsk_pr2eus/pr2eus_tutorials/apps/app.installed
[INFO] [1640495999.662914]: 2 apps found in /home/leus/ros/melodic/src/jsk-ros-pkg/jsk_robot/jsk_robot_common/jsk_robot_startup/apps/robot_apps.installed
[INFO] [1640496012.381850]: 12 apps found in /home/leus/ros/melodic/src/jsk-ros-pkg/jsk_robot/jsk_fetch_robot/jsk_fetch_startup/apps/fetch_apps.installed
[INFO] [1640496015.567683]: 3 apps found in /home/leus/ros/melodic/src/jsk-ros-pkg/jsk_robot/jsk_pr2_robot/jsk_pr2_startup/apps/pr2_apps.installed
Without this PR,
35818241 function calls (33742020 primitive calls) in 19.040 seconds
[ERROR] [1640496024.228704]: total time: 27.6996641159
With this PR,
478007 function calls (462837 primitive calls) in 0.423 seconds
[ERROR] [1640495916.035495]: total time: 0.429724931717
f4a8a4d
to
594b217
Compare
594b217
to
5b995f8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't test any of this but now the changes make sense looking at the source code.
Please review and merge @k-okada .
@k-okada Kindly ping |
UPDATE: I update this PR to speed up more.
Loading apps takes long time, which drops my productivity.
I change not to useroslib.packages.find_resource
for speed up.I change to share the same
rospack
object between multiple functions to makeroslib.packages.find_resource
faster.Current
kinetic-devel
takes 39 seconds to load 12 app.This PR reduces it to 4 seconds.
kinetic-devel
branchcProfile output
This PR