Skip to content

Fast /drivers path (static roster index) to remove the FastF1-parse wait #96

Description

@VforVitorio

Problem

After the user picks a session, the DRIVERS combobox is unusable for the ~2-15s it takes FastF1 to parse the session behind GET /api/v1/telemetry/drivers. PR #95 added a loading affordance (spinner + aria-busy + "Loading drivers…") so it reads as working rather than broken — but the underlying wait is still there.

Proposal

Serve the driver roster (and GP/session lists) from a static index committed to the repo, with a FastF1 fallback for anything not in the index:

  • backend/scripts/build_telemetry_index.pybackend/static/telemetry_index.json (2022-2025 rosters/GPs/sessions frozen).
  • get_available_gps / get_sessions / get_drivers become a dict lookup first, FastF1 fallback second.
  • Turns a seconds-long list into a <5ms response; the session still parses lazily on the first telemetry request (prewarm already covers that).

Notes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions