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