]> git.ozlabs.org Git - patchwork/commit
xmlrpc: do slice before patch_to_dict
authorJeremy Kerr <jk@ozlabs.org>
Mon, 18 Jul 2011 13:46:08 +0000 (21:46 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Mon, 18 Jul 2011 13:46:08 +0000 (21:46 +0800)
commit539b6596dc1bf1d3118631095625e354026da373
tree82b6f1f96f452ee8cbc078a1448085ae3b1703aa
parent85e391e7781464514b9df6e7b6936515c3db6c46
xmlrpc: do slice before patch_to_dict

Currently, we map patch_to_dict before we slice the results (to only
return max_count patches). This means that we hacve to retrieve all
patches, then throw away most of the results of the map.

This change does the slice on the patches before the map, letting django
do a LIMIT-ed query instead.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
apps/patchwork/views/xmlrpc.py