Update Profile to avoid LocalSite queries if LocalSites aren't used.
Review Request #12354 — Created June 11, 2022 and submitted — Latest diff uploaded
This updates
Profile.get_starred_review_groups_count()
,
Profile.get_starred_review_requests_count()
, and related functions to
avoid factoring in aLocalSite
value if Local Sites aren't used in the
deployment.Most deployments do not use Local Site functionality. By performing this
check, we're able to avoid a JOIN betweenLocalSite
and a starred
object, instead letting us operate on thethrough
tables, just like
whenLocalSite.ALL
is passed. The vast majority of deployments will
benefit from this improved performance, especially combined with the new
caching.
All unit tests pass.