aboutsummaryrefslogtreecommitdiff
path: root/htdocs/js
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2014-05-07 20:24:17 +0800
committerJeremy Kerr <jk@ozlabs.org>2014-05-08 11:05:39 +0800
commit2c2f5e99038e223a8baed9766779fc6dbc98137e (patch)
tree15e56e9abf068710a385a6347af7b895a5584f37 /htdocs/js
parent81a65cc81d151cbb412d2a833abab24dfc133a49 (diff)
downloadpatchwork-2c2f5e99038e223a8baed9766779fc6dbc98137e.tar
patchwork-2c2f5e99038e223a8baed9766779fc6dbc98137e.tar.gz
views/generic_list: reduce number of queries in list rendering
Currently, we do two database queries per patch on a list view; one to retrieve the submitter, and one for the state. This patch adds a .select_related to fetch for the submitter and state, and a .defer() to prevent loading large amounts of text data from the patch content and headers. This gives a significant reduction in the work per request. For a paginated list view (ie 100 patches per page): before after User 1344 ms 228 ms System 170 ms 25 ms Total 1514 ms 253 ms Elapsed 1605 ms 274 ms Context switch (vol) 4206 40 Context switch (invol) 326 75 SQL queries 212 15 Longest query 13 ms 5 ms Total query time 121 ms 20 ms Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'htdocs/js')
0 files changed, 0 insertions, 0 deletions