Homec4science

Minor optimization for unit test

Authored by Joshua Spence <josh@joshuaspence.com> on May 5 2015, 12:02.

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

Committed
Joshua Spence <josh@joshuaspence.com>May 5 2015, 12:02
Pushed
aubortMar 17 2017, 12:03
Parents
rPHU21268aff1d8a: Add some missing type hints
Branches
Unknown
Tags
Unknown

Event Timeline

Joshua Spence <josh@joshuaspence.com> committed rPHUcb8cdccb1a50: Minor optimization for unit test (authored by Joshua Spence <josh@joshuaspence.com>).May 5 2015, 12:02