Merge lp://staging/~james-w/rnr-server/fewer-queries into lp://staging/rnr-server

Proposed by James Westby
Status: Merged
Approved by: James Westby
Approved revision: 270
Merged at revision: 270
Proposed branch: lp://staging/~james-w/rnr-server/fewer-queries
Merge into: lp://staging/rnr-server
Diff against target: 33 lines (+12/-1)
2 files modified
src/clickreviews/api/handlers.py (+3/-1)
src/clickreviews/tests/test_handlers.py (+9/-0)
To merge this branch: bzr merge lp://staging/~james-w/rnr-server/fewer-queries
Reviewer Review Type Date Requested Status
Wes Mason (community) Approve
Review via email: mp+230951@code.staging.launchpad.net

Commit message

select_related the related models in the reviews handler.

This avoids 2 extra queries for every review to get the package name
and reviewer name.

Description of the change

Hi,

This should be a small performance improvement.

Thanks,

James

To post a comment you must log in.
Revision history for this message
Wes Mason (wesmason) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches