( )⚙ D397 arc: fix performance of "arc unit" with vanilla arcanist

This is an archive of the discontinued Mercurial Phabricator instance.

arc: fix performance of "arc unit" with vanilla arcanist
ClosedPublic

Authored by simpkins on Aug 14 2017, 10:48 PM.
Tags
None
Subscribers
None

Details

Summary

The upstream phacility libphutil code sets the PHP "xdebug.max_nesting_level"
config setting to PHP_INT_MAX. When using HHVM this turns on XDebug profiling,
which appears to make things substantially slower, particularly on Linux.

This was making "arc unit" take substantially longer, and even caused test
failures in some cases. (For instance, some tests check for messages saying
that hg obtained the lock after 1 second, but this can take substantially
longer than 1 second with XDebug profiling enabled.)

Resetting xdebug.max_nesting_level back to 0 turns profiling back off again,
and fixes the performance issues.

Test Plan

Ran arc unit and confirmed that it ran in roughly the same time as running
scripts/unit.py manually.

Diff Detail

Repository
rFBHGX Facebook Mercurial Extensions
Branch
default
Lint
Lint OK
Unit
Unit Tests OK

Event Timeline

simpkins created this revision.Aug 14 2017, 10:48 PM
Herald added a reviewer: Restricted Project. · View Herald TranscriptAug 14 2017, 10:48 PM
quark accepted this revision.Aug 15 2017, 12:06 AM
This revision is now accepted and ready to land.Aug 15 2017, 12:06 AM
ryanmce edited edge metadata.Aug 15 2017, 3:42 AM

Wow, awesome debugging!

This revision was automatically updated to reflect the committed changes.