[Question] colcon list slow ?
I was wondering if colcon list is slow or is it something in my system that makes it slow?... I find it interesting that a workspace with a single empty package takes more than a second to return the list.
user@laptop:~/ros2_ws $ time colcon list
empty_python src/empty_python (ros.ament_python)
real 0m1.633s
user 0m0.895s
sys 0m0.229s
Is there anything that can be done about this?.... here is some additional information, thanks 😄
System information:
OS: Ubuntu 20.04.6 LTS
CPU: Intel i7-10750H
Memory: 8GB
ROS distro: Foxy
That's certainly pretty slow.
You might try using a tool like flameprof to figure out which Python functions are taking so long: python3 -m flameprof -o colcon_list.svg -m colcon list
it seems to be executing the _find_and_load function multiple times.
I do not know much about the internal architecture of colcon clearly I can not give at this moment a more precise interpretation ... sorry for that 🤣