1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-20 05:42:40 +01:00

Pull only existing authorPHIDs in blame

Summary:
I've hit this error by exhausting memory limit on blaming a big file with lots of unknown authors.
It triggered the error ~1000 times with stack trace containing the whole ~100 kB file.
The memory ran out when it tried to JSON serialize the stack traces for the DarkConsole.

Test Plan: Blamed file with unknown authors.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5730
This commit is contained in:
Jakub Vrana 2013-04-18 20:20:43 -07:00
parent d2874a96b8
commit 725373386a

View file

@ -432,7 +432,9 @@ final class DiffusionBrowseFileController extends DiffusionController {
$epoch_min = min($epoch_list);
$epoch_max = max($epoch_list);
$epoch_range = ($epoch_max - $epoch_min) + 1;
$handles = $this->loadViewerHandles(ipull($blame_dict, 'authorPHID'));
$author_phids = ipull(ifilter($blame_dict, 'authorPHID'), 'authorPHID');
$handles = $this->loadViewerHandles($author_phids);
}
$line_arr = array();