Improve performance of checking whether diffsets exist.

Review Request #12853 — Created Feb. 28, 2023 and submitted — Latest diff uploaded

Information

Review Board
release-6.x

Reviewers

Some review request actions need to check whether the current review
request has any diffsets. This was initially done by checking directly
on the diffset history, but there are some shortcuts we can take in this
computation based on various caches. This change adds a new
has_diffsets property for this purpose.

Ran unit tests.

Diff Revision 1

This is not the most recent revision of the diff. The latest diff is revision 2. See what's changed.

orig
1
2

Commits

First Last Summary ID Author
Improve performance of checking whether diffsets exist.
Some review request actions need to check whether the current review request has any diffsets. This was initially done by checking directly on the diffset history, but there are some shortcuts we can take in this computation based on various caches. This change adds a new `has_diffsets` property for this purpose. Testing Done: Ran unit tests.
3fa34899e13e37db206a782cd37678ea172bd54a David Trowbridge
reviewboard/reviews/actions.py
reviewboard/reviews/models/review_request.py
reviewboard/reviews/tests/test_review_request.py
Loading...