]> git.ipfire.org Git - thirdparty/patchwork.git/commit
Optimise fetching checks when displaying a patch
authorStewart Smith <stewart@linux.ibm.com>
Fri, 10 Aug 2018 08:01:04 +0000 (18:01 +1000)
committerStephen Finucane <stephen@that.guru>
Mon, 10 Sep 2018 20:24:24 +0000 (14:24 -0600)
commite5c641fc47dae131cccefd49d7818eb249bbb7fb
tree1f8a82a0811e96595fca67f260c54e33c647b8a7
parent332956146469575c3ceeb3ecd94c7459e1e3dbea
Optimise fetching checks when displaying a patch

Prior to this patch, a typical /patch// query for linuxppc-dev
(which has about half a dozen checks per patch) took around 20 queries
and 16.5ms in the database. About half of those queries were fetching
the checks and who did the check.

We can just do one query to get all that needed information, so we do
that. This brings a page load down to 10 queries in 12ms.

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