1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-26 07:20:57 +01:00
phorge-phorge/src/applications/differential
epriestley 7c502e3e4e Fix performance issue with large changesets in Differential
Summary:
Fixes T3151. Javelin treats a behavior without parameters as a global behavior and invokes it only once no matter how many times it is initialized (this is necessarily correct for any reasonable behavior, as the inputs do not vary). A recent patch changed `differential-dropdown-menus` from a zero-argument global behavior to an implicitly nonzero-argument behavior by adding `pht`.

Currently, we initialize the behavior next to dropdown menu creation, so this resulted in `O(N^2)` initializations of the menus. For large diffs, this locks browsers. Instead, initialize outside of the dropdown loop so we ginitialize each menu just once.

Test Plan: Viewed a 2,000 file diff without browser lock.

Reviewers: wez, vrana, btrahan

Reviewed By: wez

CC: aran

Maniphest Tasks: T3151

Differential Revision: https://secure.phabricator.com/D5885
2013-05-10 05:39:44 -07:00
..
__tests__ Require a viewer for Remarkup rendering 2013-03-04 12:33:05 -08:00
application Adding hovercard event listeners for Users, Revisions, Conpherence and Commits 2013-04-05 17:01:54 -07:00
conduit Adding pro tips to Differential commit message 2013-03-19 09:29:25 -07:00
config Flip strings for 'metamta.differential.unified-comment-context' config 2013-04-26 06:19:07 -07:00
constants PHT's for Differential. 2013-01-24 10:46:47 -08:00
controller Update form styles, implement in many places 2013-05-07 14:07:06 -07:00
data Delete license headers from files 2012-11-05 11:16:51 -08:00
editor Fix a missing setActor() on DifferentialNewDiffMail 2013-02-28 17:23:23 -08:00
events Hovercard tweaks 2013-04-06 21:16:55 -07:00
exception Delete license headers from files 2012-11-05 11:16:51 -08:00
field Load commits affected by revert language in Diffusion message parser 2013-05-06 18:05:33 -07:00
lipsum xDiffs and Revisions Generating 2013-05-06 14:11:37 -07:00
mail Require a viewer to load handles 2013-02-28 17:15:09 -08:00
parser Apply lint rules to Phabricator 2013-02-19 13:33:10 -08:00
query Prepare for hovercards 2013-02-26 14:59:31 -08:00
remarkup Require a viewer for Remarkup rendering 2013-03-04 12:33:05 -08:00
render Fix function/method declaration lint in Phabricator. Automatic patches. 2013-02-19 13:47:03 -08:00
search Require a viewer to load handles 2013-02-28 17:15:09 -08:00
stats Delete license headers from files 2012-11-05 11:16:51 -08:00
storage xDiffs and Revisions Generating 2013-05-06 14:11:37 -07:00
view Fix performance issue with large changesets in Differential 2013-05-10 05:39:44 -07:00
DifferentialReplyHandler.php Require a viewer to load handles 2013-02-28 17:15:09 -08:00
DifferentialTasksAttacher.php Delete license headers from files 2012-11-05 11:16:51 -08:00