Homec4science

Fix performance issue with large changesets in Differential

Authored by epriestley <git@epriestley.com> on May 10 2013, 14:39.

Description

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

Details

Committed
epriestley <git@epriestley.com>May 10 2013, 14:39
Pushed
aubortJan 31 2017, 17:16
Parents
rPH13464cc56803: Clean up inline edit ui
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH7c502e3e4eda: Fix performance issue with large changesets in Differential (authored by epriestley <git@epriestley.com>).May 10 2013, 14:39