Homec4science

Use Lisk sets in fact update iterator

Authored by vrana <jakubv@fb.com> on Aug 11 2012, 08:30.

Description

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

Details

Committed
vrana <jakubv@fb.com>Aug 13 2012, 19:26
Pushed
aubortJan 31 2017, 17:16
Parents
rPH74b438db136f: Move "Mailing Lists" to a separate application
Branches
Unknown
Tags
Unknown

Event Timeline

vrana <jakubv@fb.com> committed rPHf841491524f1: Use Lisk sets in fact update iterator (authored by vrana <jakubv@fb.com>).Aug 13 2012, 19:26