Use Lisk sets in fact update iterator
Summary:
Fact engines loading dependent objects are super slow because they load them one by one.
This diff put each page in a Lisk set allowing engines to use loadRelatives().
It also introduces clearSet() method which is somewhat neccessary in PHP < 5.3 or with disabled cyclic GC.
Test Plan:
$iterator = new PhabricatorFactUpdateIterator(new DifferentialRevision()); foreach ($iterator as $revision) { $diffs = $revision->loadRelatives(new DifferentialDiff(), 'revisionID'); echo memory_get_usage() . "\n"; }
Experienced not-steadily-increasing memory usage and much faster loading.
Reviewers: epriestley
Reviewed By: epriestley
CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D3247