Remove completely pointless load of every repository when viewing a repository URI
Summary: See D18176. This query has no effect (other than wasting resources) and the result is unused. `$repository` already has the URI loaded because we load them unconditionally during request initialization. Test Plan: Viewed repository URIs. Subscribers: jmeador Differential Revision: https://secure.phabricator.com/D19036
This commit is contained in:
@@ -23,14 +23,10 @@ final class DiffusionRepositoryURIViewController
|
||||
return new Aphront404Response();
|
||||
}
|
||||
|
||||
// For display, reload the URI by loading it through the repository. This
|
||||
// For display, access the URI by loading it through the repository. This
|
||||
// may adjust builtin URIs for repository configuration, so we may end up
|
||||
// with a different view of builtin URIs than we'd see if we loaded them
|
||||
// directly from the database. See T12884.
|
||||
$repository_with_uris = id(new PhabricatorRepositoryQuery())
|
||||
->setViewer($viewer)
|
||||
->needURIs(true)
|
||||
->execute();
|
||||
|
||||
$repository_uris = $repository->getURIs();
|
||||
$repository_uris = mpull($repository_uris, null, 'getID');
|
||||
|
||||
Reference in New Issue
Block a user