Skip to content

HAR analysis: Open place drawer

Source: place-drawer.har — opening the place drawer (clicking a place on the map).

Flow: User opens the place drawer for a specific place. The drawer shows place details, tabs (overview, visits, etc.), and cycle data for the place visit table.

API calls (observed)

API Count Notes
POST /cycles/search?size=1000 4× Identical request within ~10ms; each takes ~1.7–1.8s
GET /places/{id} 1× Place details — expected

Duplicated calls

  • cycles/search — Called 4 times with identical params when the drawer opens. Multiple components in the place drawer (e.g. place visits table, cycle filters, cycle-dependent UI) likely each trigger their own load. Each call is slow (~1.8s), so 4× adds ~7s of redundant network time.

Suggested fix

  • Load cycles once when the place drawer opens; share via store or a shared service.
  • Trace callers of cycles/search in the place drawer tree and consolidate to a single source.
  • Consider caching cycles at control-room level (cycles are shared across places) if not already loaded.

Estimated impact

  • Before: 4× cycles/search (~7s total redundant load time).
  • After fix: 1× — ~75% reduction in cycles calls; drawer opens much faster.