You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The base queryset used by the view/filter already has prefetch, it's the model methods that are sporadic in usage of prefetching.
Specifically, I was trying to improve the query performance in #463 and found that Project.has_good_build avoids the prefetch from Project.objects.dashboard(user). I replaced this with Project.get_latest_build and the extra queries were removed, but this logic is slightly different.
Along with a model prefetch change in the view, this reduces the number
of queries by 90 queries, from 132 to 42. This:
- Uses prefetchs build for `latest_build` to avoid multiple lookups on `Version.build`
- Retains usage of a prefetched `project` on Version
- Swaps some permission check logic to only perform additional user queries on private versions
- Passes a project object into the build chip to avoid a lookup on `Build.project.*`
- Refs #61
- Fixes#463
* Template optimizations on version listing
Along with a model prefetch change in the view, this reduces the number
of queries by 90 queries, from 132 to 42. This:
- Uses prefetchs build for `latest_build` to avoid multiple lookups on `Version.build`
- Retains usage of a prefetched `project` on Version
- Swaps some permission check logic to only perform additional user queries on private versions
- Passes a project object into the build chip to avoid a lookup on `Build.project.*`
- Refs #61
- Fixes#463
* Lint
* Call build chip the same way in project listing
* Fix variable passed into chip
Add prefetch build to project dashboard project list queryset
The text was updated successfully, but these errors were encountered: