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 38 forks source link

GetAvailableMissions is too slow if many missions #1739

Open Eddasol opened 2 months ago

Eddasol commented 2 months 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 2 months ago

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

Christdej commented 2 months ago

One suggestion is too make Area optional on MissionDefinition and only load Area once someone is trying to start the mission.

tsundvoll commented 1 month ago

The plan is to get the area information from the mission planner (Echo for example). Waiting on implementation for this