diff options
author | Dan McGee <dan@archlinux.org> | 2012-12-28 21:41:18 +0100 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2012-12-28 21:48:29 +0100 |
commit | 20b64e42672d185821cc584dfa4b133ee259a144 (patch) | |
tree | e4ac17f704cc73eaeb1c806f09cb40b05da1de92 /packages/views/search.py | |
parent | 29be1e06032ad8a0a38921b9e04be888141881b1 (diff) | |
download | archweb-20b64e42672d185821cc584dfa4b133ee259a144.tar.gz archweb-20b64e42672d185821cc584dfa4b133ee259a144.tar.xz |
Reduce query count when retrieving satisfiers and providers
Django doesn't attach the parent object to the child objects, even when
queried through the related manager. This causes up to 3 extra queries:
one to retrieve the package again, and one each for arch and repo
retrieval.
For a package like archboot, this drops the number of necessary queries
for the package page from 805 to 222 (yes, this is still too high) and
cuts the time spent waiting on the database from 505ms to 262ms.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'packages/views/search.py')
0 files changed, 0 insertions, 0 deletions