@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.

Optimize feed query

Summary:
This was killing us. `EXPLAIN` after:

<table>
<tr><th>id</th><th>select_type</th><th>table</th><th>type</th><th>possible_keys</th><th>key</th><th>key_len</th><th>ref</th><th>rows</th><th>Extra</th></tr>
<tr><td>1</td><td>SIMPLE</td><td>story</td><td>index</td><td>chronologicalKey</td><td>chronologicalKey</td><td>8</td><td></td><td>201</td><td> </td></tr>
<tr><td>1</td><td>SIMPLE</td><td>ref</td><td>ref</td><td>chronologicalKey</td><td>chronologicalKey</td><td>8</td><td>phabricator_feed.story.chronologicalKey</td><td>1</td><td>Using index</td></tr>
</table>

Test Plan: /feed/

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

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

vrana 511a8bae 5578ccdf

+7 -2
+1
src/applications/directory/controller/PhabricatorDirectoryMainController.php
··· 139 139 140 140 $filter = $subnav->selectFilter($this->subfilter, 'all'); 141 141 142 + $view = null; 142 143 switch ($filter) { 143 144 case 'all': 144 145 $view = $this->buildFeedView(array());
+6 -2
src/applications/feed/PhabricatorFeedQuery.php
··· 76 76 private function buildGroupClause(AphrontDatabaseConnection $conn_r) { 77 77 return qsprintf( 78 78 $conn_r, 79 - 'GROUP BY ref.chronologicalKey'); 79 + 'GROUP BY '.($this->filterPHIDs 80 + ? 'ref.chronologicalKey' 81 + : 'story.chronologicalKey')); 80 82 } 81 83 82 84 protected function getPagingColumn() { 83 - return 'ref.chronologicalKey'; 85 + return ($this->filterPHIDs 86 + ? 'ref.chronologicalKey' 87 + : 'story.chronologicalKey'); 84 88 } 85 89 86 90 protected function getPagingValue($item) {