Skip to content

Paginate the local site partners index #3516

Description

@kimadactyl

A single site's partners page (render_local_index in PartnersController) renders every partner it has, with no pagination. The nationwide directory index already paginates (A-Z filter plus 30 per page via paginate_with_az_filter); the local index does not.

On the Trans Dimension site (108 partners) this means building 108 partner cards on every request, about 600ms of Phlex rendering, which is now the slowest part of that page after the query fixes in #3511, #3512 and #3513. A larger site would be proportionally worse.

Proposed: give the local index the same A-Z + pagination treatment the directory uses, so it renders roughly 30 cards a page. It is a visible UX change to every site's partners page, so it was deferred out of the Trans Dimension shipping work rather than bundled in.

Context: profiled on staging, the partners page was ~1.5s warm, of which ~0.2s DB and ~0.6s rendering the 108 cards (the rest framework overhead). The cheap render tidy-ups (partner_path instead of the record in link_to, dropping a debug HTML comment) are handled separately; this issue is the pagination.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions