Skip to content

HAR analysis: Open asset drawer

Source: asset-drawer.har — opening the asset drawer (clicking an asset on the map).

Flow: User opens the asset drawer for a specific asset. The drawer shows asset details, tabs (overview, events, places, tasks, files), and may need collaborator info for permissions/role checks.

API calls (observed)

API Count Notes
GET /controlrooms/{id}/collaborators 3× Same request within ~50ms (04:02:10.096, 04:02:10.100, 04:02:10.143)
GET /assets/{id}/snapshot/{timestamp} 2× 1× on open; 1× ~16s later (refresh/polling — expected)

Duplicated calls

  • getCollaborators — Called 3 times in quick succession when the drawer opens. Multiple components or directives (e.g. role checks, permission UI) likely each trigger their own load instead of reusing collaborators from the store.

Suggested fix

  • Use collaborators from the control room store when available; only fetch if not yet loaded.
  • Trace callers of the collaborators API in the asset drawer tree and consolidate to a single source.

Estimated impact

  • Before: 3× collaborators on drawer open.
  • After fix: 1× (or 0× if already in store).