Skip to content

Improve Lesson Index page performance #2663

Description

@KralMarko123

Currently, the lessons page is slow because it builds out one view for all lessons which aggregates a completely different view which is quite expensive. The problem is that we do this for literally all the lessons we plan on paginating.

What we SHOULD do is apply scopes on the lessons we actually plan on displaying querying lessons directly, and then use those to build out the LessonTableRow with the calculations that we need. This would involve probably some extra methods either in the controller or LessonTableRow, but should reduce the querying time quite a bit.

This ticket will ideally also resolve the 504 error that users in Africa have been reporting with slow internet connections.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status
    Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions