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

Speed up DiffusionBrowseFileController by removing call to array_merge

Summary: Some profiling using XHProf in the Dark Console showed me that Diffusion was wasting a ton of time on array_merge. This change sped up the loading of a large file in Diffusion from 16.8 seconds to 2.4 seconds.

Test Plan: Load files in Diffusion. They all look good. Also, use a PHP shell to try to manually verify that I still kinda remember some PHP and, yes, this is functionally equivalent to what was there before.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

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

authored by

Jacob Hurwitz and committed by
epriestley
9d0d1ac4 e96c363e

+5 -2
+5 -2
src/applications/diffusion/controller/DiffusionBrowseFileController.php
··· 800 800 ), 801 801 $blame); 802 802 803 - $rows = array_merge($rows, $this->renderInlines( 803 + $cur_inlines = $this->renderInlines( 804 804 idx($inlines, $line['line'], array()), 805 805 ($show_blame), 806 - $engine)); 806 + $engine); 807 + foreach ($cur_inlines as $cur_inline) { 808 + $rows[] = $cur_inline; 809 + } 807 810 } 808 811 809 812 return $rows;