]> git.ipfire.org Git - thirdparty/patchwork.git/commit
Fetch all series for patch/cover viewing
authorStewart Smith <stewart@linux.ibm.com>
Fri, 10 Aug 2018 08:00:59 +0000 (18:00 +1000)
committerStephen Finucane <stephen@that.guru>
Mon, 10 Sep 2018 20:15:46 +0000 (14:15 -0600)
commit2e46aa9ec3dea42942012e6ed8c48276249719a8
treecc5a54bf0a6896dbfe7c0497f7d923568c5580dd
parentc757b305b12c3574f0cc283a66d7f59efa5e34ed
Fetch all series for patch/cover viewing

e.g. a 10 comment patch goes from 26 queries in 17-20ms down to 20
queries in 12ms.

A 67 comment cover letter goes from 14 queries in 16ms down to 8 queries
in 8ms.

So, effectively, a near 2x perf improvement.

Previously, at several points we were asking for the latest series and
then asking for all the series. Since there just usually aren't *that*
many series, fetch them all and take the first one if we need to.

Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
[stephenfin: Fix typos in the template and ensure patches from all
 series are shown]
Signed-off-by: Stephen Finucane <stephen@that.guru>
patchwork/templates/patchwork/submission.html
patchwork/views/cover.py
patchwork/views/patch.py