HomePhabricator

Minor optimization for unit test

Description

Minor optimization for unit test

Summary: I noticed that PhabricatorLibraryTestCase::testMethodVisibility takes a long time to execute (up to 90 seconds on my laptop). Looking at the profile it seems that most (54.5%) of the execution time is spent in PhutilLibraryTestCase::getVisibility. Rewriting PhutilLibraryTestCase::testMethodVisibility to use a bitmask instead of strings seems to provide a significant performance improvement (on my local machine, this test now takes 45 seconds, see the profile).

Test Plan: arc unit

Reviewers: Blessed Reviewers, epriestley

Reviewed By: Blessed Reviewers, epriestley

Subscribers: argp, Korvin, epriestley

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

Details

Provenance
joshuaspenceAuthored on
joshuaspencePushed on May 5 2015, 10:16 AM
Reviewer
Blessed Reviewers
Differential Revision
D12654: Minor optimization for unit test
Parents
rPHU21268aff1d8a: Add some missing type hints
Branches
Unknown
Tags
Unknown