Skip to content

HAR analysis: Control room Task page

Source: control-room-task-page.har — opening the Task page (/control-rooms/:id/tasks).

Flow: User navigates to the control room Tasks page. The page loads task count (for badge/summary), task list, rules (for filters), rule types, collaborators, and control room info.

API calls (observed)

API Count Notes
POST /tasks/{id}/search?size=1&page=0 10× Task count — identical request; within ~250ms
POST /tasks/{id}/search?size=20&page=0 3× Task list — same params
GET /controlrooms/{id}/collaborators 2×
GET /controlrooms/{id} 1×
GET /rule-types 1×
POST /controlrooms/{id}/rules/search 1×

Duplicated calls

  • tasks/search?size=1 — Called 10 times for task count. Multiple components (e.g. task badge, task summary, filter chips, table header) likely each trigger their own load instead of sharing a single task-count value.
  • tasks/search?size=20 — Called 3 times for the task list; 1× would suffice.
  • getCollaborators — 2× (same pattern as other pages).

Suggested fix

  • Task count — Load once; store in NgRx or a shared service; expose via selector for badge, summary, filters, etc.
  • Task list — Single load; route through store.
  • Collaborators — Use control room store when available.

Estimated impact

  • Before: 10× task count + 3× task list + 2× collaborators = 15 calls in ~600ms.
  • After fix: 1× task count + 1× task list + 0–1× collaborators = 2–3 calls — ~80% reduction.