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 2 (Latest)

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.
f08dd3da18e5205b353472879d4159bf653bcbff David Trowbridge
reviewboard/reviews/actions.py
reviewboard/reviews/models/review_request.py
reviewboard/reviews/tests/test_review_request.py
Loading...