equinor / flotilla

Flotilla is the main point of access for operators to interact with multiple robots in a facility.
Eclipse Public License 2.0
16 stars 35 forks source link

GetAvailableMissions is too slow if many missions #1739

Open Eddasol opened 1 day ago

Eddasol commented 1 day ago

Describe the bug If clicking the "Add predefined missions" button on an asset with several longer missions, the loading is unreasonable long. This is if using echoMissionLoader as selected missionLoader.

This is probably because the missionLoader is iterating through all missions and calling ProcessEchoMissions which is iterating through all tasks and inspections.

To Reproduce Steps to reproduce the behavior:

  1. Select an asset with several longer missions
  2. Click the "Add predefined missions"-button

Expected behavior This shouldn't take several minutes. Tested on one asset with 75missions, and the fetching took 2,5 minutes.

Screenshots

Eddasol commented 21 hours ago

Bug was introduced in this commit: https://github.com/equinor/flotilla/commit/54ba48c323403d1e3122b802bd79521354b3d06b