← Back to team overview

launchpad-dev team mailing list archive

Re: Lower query counts via different code structure

 

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 11/09/2010 02:06 AM, Martin Pool wrote:
>> people = bugs.get_subscribers()
>> people.update(bugs.get_assignees())
>> people.update(bugs.get_reporters())
>> branding.update(people.get_branding())
>> context.realise()
>> distro = None
>> for bug in bugs:
>>    if bug.distro != distro:
>>        distro = bug.distro:
>>            show_branding(distro)
>>    ...
> 
> 'update' is already so strongly bound in database code perhaps
> 'expand' would be better.

I assumed it was like set.update().

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkzZZOwACgkQ0F+nu1YWqI1aUwCghXVD170ahrwaXOMdEDRcd/xx
0e8Anjr3ioRExcrb2aNTsGskhtlSlmQc
=+8gS
-----END PGP SIGNATURE-----



Follow ups

References