Skip to content

Remove expand_fields from conference list and add server-side pagination #17

@agonza1

Description

@agonza1

Problem: GET /v1/conferences?appId=xxx takes ~56s due to two compounding issues:

1.N+1 queries from expand_fields — The list endpoint inlines participants and issues for every conference. With 500 conferences, serialize() fires 1000+ individual queries (utils.py:182). The web dashboard already fetches sessions/issues via separate API calls, so the inlined UUIDs on the list are redundant.

2. No pagination — The endpoint returns every conference in a single response. The web dashboard paginates client-side with Bootstrap Vue (perPage=20), so all the extra data is fetched but never displayed.

Changes:

A) Remove expand_fields from conference list (conference_view.py:47-52)

  • List view: serialize(objs=objs) — no expand_fields
  • Detail view (single conference): keep expand_fields=('participants', 'issues')

B) Add server-side pagination to list endpoints

  • Accept ?limit= and ?offset= query params
  • Default limit=50
  • Return total count in response (e.g. { results: [...], count: 1234 }) so the frontend can render pagination controls
  • Apply to: ConferencesView, EventView, SessionView, ParticipantsView

C) Fix BaseModel.filter() eager queryset materialization. Every .filter() call across the entire API (conferences, sessions, events, participants) hits both problems. Even with LIMIT/OFFSET at the view level, this method fetches every matching row first.

Impact: Should bring the conference list rendering to a few seconds.

This resolves part of the issues described here: #15 (comment) and should solve #2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions