]> git.ipfire.org Git - thirdparty/patchwork.git/commit
Fetch maintainer information in one query
authorStewart Smith <stewart@linux.ibm.com>
Fri, 10 Aug 2018 08:01:06 +0000 (18:01 +1000)
committerStephen Finucane <stephen@that.guru>
Mon, 10 Sep 2018 20:24:24 +0000 (14:24 -0600)
commit880ec8c5cddbf5505d350a50d617ff7c817828c2
treea4dcf275534e47d977a97d1fc063d129e7c9b716
parentcfcf2f2a80ac0709f1a5fd9aa212c8403daa5a18
Fetch maintainer information in one query

Viewing the /project/ page lists maintainers. Prior to this patch,
this was done in one query to fetch the maintainer IDs, and then one
query per mainatiner to get the name/email address.

Now, with this patch, it's all in one query (yay joins) and saves
a few ms of database queries for displaying the page.

Realistically, this doesn't save us too much time as counting how many
patches are there takes 99% of the database time for this page.

Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Reviewed-by: Stephen Finucane <stephen@that.guru>
patchwork/views/project.py