Home GnuPG

When computing revision ownership, cache some intermediate results for…
3bea3fbb1289Unpublished

Unpublished Commit · Learn More

Repository Importing: This repository is still importing.

Description

When computing revision ownership, cache some intermediate results for performance

Summary:
Ref T12319. With large datasets, the computation of which packages own paths in a revision is needlessly slow.

Improve performance through caching:

  • Cache which paths belong to each repository.
  • Cache the split fragments of each path.
  • Cache the path fragment counts.
  • Micro-optimize accessing $this->path.

Test Plan:

  • Used bin/lipsum to generate 4,000 packages with 150,000 paths.
  • Created a revision affecting 100 paths in phabricator/ (these paths mostly overlap with bin/lipsum path rules, since Lipsum uses Phabricator-like rules to generate paths).
  • Before optimizations, this revision spent about 5.5 seconds computing paths.
  • After optimizations, it spends about 275ms.

{F3423414}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12319

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

Details

Provenance
epriestley <git@epriestley.com>Authored on Feb 27 2017, 4:59 PM
Parents
rPHABb9568646ac00: Add an owners package generator for Lipsum
Branches
Unknown
Tags
Unknown

Event Timeline