[PATCH v2 1/6] api: Prefetch Series.project

Daniel Axtens dja at axtens.net
Thu Mar 23 12:59:00 AEDT 2017


Hi Stephen,

Apologies for taking so long to address the Patchwork backlog.

This patch looks good.

I suppose we really ought to bite the bullet and add some performance
regression tests. I suppose I will put my hand up for that.

Regards,
Daniel

PS - just noticed there's a v3, will send further comments on that.

Stephen Finucane <stephen at that.guru> writes:

> I missed this when testing due to only having a single project. There
> will be performance issues on instances using multiple projects.
>
> Signed-off-by: Stephen Finucane <stephen at that.guru>
> Cc: Andy Doan <andy.doan at linaro.org>
> ---
>  patchwork/api/series.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/patchwork/api/series.py b/patchwork/api/series.py
> index f66f0d2..3d5847b 100644
> --- a/patchwork/api/series.py
> +++ b/patchwork/api/series.py
> @@ -51,7 +51,7 @@ class SeriesMixin(object):
>  
>      def get_queryset(self):
>          return Series.objects.all().prefetch_related('patches',)\
> -            .select_related('submitter', 'cover_letter')
> +            .select_related('submitter', 'cover_letter', 'project')
>  
>  
>  class SeriesList(SeriesMixin, ListAPIView):
> -- 
> 2.9.3
>
> _______________________________________________
> Patchwork mailing list
> Patchwork at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/patchwork


More information about the Patchwork mailing list