[PATCH] xmlrpc: Don't load all Patches into memory
Stephen Finucane
stephenfinucane at hotmail.com
Sun Aug 14 08:51:20 AEST 2016
On 15 Jul 11:31, Andy Doan wrote:
> On 07/13/2016 04:57 AM, Stephen Finucane wrote:
> > The way that reverse indexing of patches was implemented is broken.
> > At present, it will retrieve all patches in memory and return the
> > length from that data, then the slicing operation will then happen
> > without querying the DB and slice the results cached from the len()
> > evaluation. This is memory intensive, particularly for larger
> > instances.
> >
> > Take advantage of Django's lazy loading to avoid this.
> >
> > Signed-off-by: Stephen Finucane <stephen.finucane at intel.com>
> > Suggested-by: Damien Lespiau <damien.lespiau at intel.com>
> > ---
> Reviewed-by: Andy Doan <andy.doan at linaro.org>
Merged.
More information about the Patchwork
mailing list