hypothesis / hypothesis/product-backlog

list_groups service: evaluate eager-loading SQLA relations

Open
#587 0 comments 0 reactions 0 assignees View on GitHub
groups
Dominant language
No language data
Stars
122
Forks
7
PR merge metrics
No merged PRs in 30d

Description

(Performance-related)

As I understand it, by default, SQLA will lazy-load model relations when you reference them. That's less optimal if you have a list of models and end up accessing relations on each of them—that's what we're doing when we built `GroupResource` objects; each `Group` has an expanded `organization` on it.

Perhaps change the query/ies in this service to eager-load objects by default in the `list-groups` service as we know we'll be expanding the returned Groups in many cases.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.