sonelu / roboglia

Robotics framework
GNU General Public License v3.0
0 stars 1 forks source link

Loading device definition is very slow #36

Closed sonelu closed 4 years ago

sonelu commented 4 years ago

Currently for each device in the robot definition the constructor reads the device model file and parses it. This makes the process very slow as it need to process several hundred of items when initialising the robot.

sonelu commented 4 years ago

Added a cache mechanism in BaseDevice at the class level where we store the file_ini loaded from YAML file with a key the model file. When creating another device we first check if we already have the model file in the cache, and if yes we use that instead of reloading the YAML file.