Page MenuHomePhabricator

Improve performance of `arc branch` in Git with many branches
ClosedPublic

Authored by epriestley on Apr 16 2016, 4:43 PM.
Tags
None
Referenced Files
F15460186: D15735.id37918.diff
Mon, Mar 31, 8:52 PM
F15457058: D15735.id37917.diff
Sun, Mar 30, 2:03 PM
F15453772: D15735.id.diff
Sat, Mar 29, 2:14 PM
F15448081: D15735.id37918.diff
Fri, Mar 28, 3:12 AM
F15448080: D15735.id37917.diff
Fri, Mar 28, 3:12 AM
F15448079: D15735.id.diff
Fri, Mar 28, 3:12 AM
F15446881: D15735.diff
Thu, Mar 27, 8:37 PM
F15446584: D15735.diff
Thu, Mar 27, 7:35 PM
Subscribers
None

Details

Summary

This is mostly just a personal quality-of-life fix. I run this command fairly often and having it return a little faster is nice.

This replaces a git show for each individual branch with a big git for-each-ref which we were already running anyway. This is quite a bit faster.

This command also occasionally hangs or segfaults for me while executing the huge pile of subprocesses. This is unreliable to reproduce, probably some bug in some PHP extension I have, and likely hard to narrow down, and this approach is better in every way anyway.

Test Plan
  • Ran arc branch in Git, observed faster output (in my phabricator/, about 2000ms -> 1200ms).
  • Ran arc feature in Mercurial.

Diff Detail

Repository
rARC Arcanist
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Improve performance of `arc branch` in Git with many branches.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad edited edge metadata.
This revision is now accepted and ready to land.Apr 16 2016, 5:01 PM
This revision was automatically updated to reflect the committed changes.