Skip to content

Event requirement calculation is suboptimal #494

@bri25yu

Description

@bri25yu

The prefetch_related call removes any need for the explicit call to all. The current method is suboptimal since two queries are performed: the all and the prefetch_related.

https://github.com/compserv/hknweb/blob/master/hknweb/candidate/views/officer_portal.py#L186

Also highkey, this entire section could probably be stuck into a chain of values into a count aggregation.

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