@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Filter archived packages out of the "controlling packages" query earlier

Summary:
Ref T12319. Currently, we end up filtering archived packages out once for each path. This shows up on a profile from an install as meaningfully expensive:

https://secure.phabricator.com/xhprof/profile/PHID-FILE-7kmpevyr22aih4s2vyln/?symbol=PhabricatorOwnersPackage::isArchived

Instead, filter them out before we do any work.

Test Plan:
Viewed a revision, still saw packages.

{F3425553}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12319

Differential Revision: https://secure.phabricator.com/D17427

+10 -8
+10 -8
src/applications/owners/query/PhabricatorOwnersPackageQuery.php
··· 129 129 } 130 130 131 131 if ($this->controlMap) { 132 - $this->controlResults += mpull($packages, null, 'getID'); 132 + foreach ($packages as $package) { 133 + // If this package is archived, it's no longer a controlling package 134 + // for any path. In particular, it can not force active packages with 135 + // weak dominion to give up control. 136 + if ($package->isArchived()) { 137 + continue; 138 + } 139 + 140 + $this->controlResults[$package->getID()] = $package; 141 + } 133 142 } 134 143 135 144 return $packages; ··· 360 369 foreach ($packages as $package_id => $package) { 361 370 $best_match = null; 362 371 $include = false; 363 - 364 - // If this package is archived, it's no longer a controlling package 365 - // for the given path. In particular, it can not force active packages 366 - // with weak dominion to give up control. 367 - if ($package->isArchived()) { 368 - continue; 369 - } 370 372 371 373 $repository_paths = $package->getPathsForRepository($repository_phid); 372 374 foreach ($repository_paths as $package_path) {