launchpad-dev team mailing list archive
-
launchpad-dev team
-
Mailing list archive
-
Message #05538
Re: Lower query counts via different code structure
-
To:
launchpad-dev@xxxxxxxxxxxxxxxxxxx
-
From:
Aaron Bentley <aaron@xxxxxxxxxxxxx>
-
Date:
Tue, 09 Nov 2010 10:12:44 -0500
-
In-reply-to:
<AANLkTi=pRJ1VYTG7hw1uSipO9RvtHPAWnD7EOYW5kXMD@mail.gmail.com>
-
User-agent:
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6
-----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