]> khamidou — GitHub mirrors - arcanist.git/commit
Improve mercurial 'arc land' perf by avoiding updates
authordurham <durham@fb.com>
Tue, 19 Feb 2013 21:36:02 +0000 (13:36 -0800)
committerdurham <durham@fb.com>
Tue, 19 Feb 2013 21:36:02 +0000 (13:36 -0800)
commiteda3fc2ab44f93673f23e19bb88ef7b69cbf861c
tree70c84c3111ca36b21bea707757a36fa4eb62f260
parent688e159319c5b8d6e7bb3551d86825fff4a2e636
Improve mercurial 'arc land' perf by avoiding updates

Summary:
Mercurial 'arc land --hold' was taking 90+ seconds on our large
repository.  Since most of arc land doesn't require any particular working
directory, I've changed the mercurial logic to avoid all updates except for
two: the one prior to finding the revision (only applies if the user specified
--branch), and the one at the end to leave the user in a good state.

Also got rid of a 'hg outgoing' call when phases are supported. Also changed
the hg-subversion detection to just look for .hg/svn instead of running 'hg
svn info', which was taking 4 seconds.

Now arc land takes about 50 seconds. Still much worse than git's 25 seconds.
One big hot spot is in the two 'hg rebase' calls, which account for 25 seconds
(versus 11 seconds of git).

Test Plan:
Tested arc land with mercurial and git. Tested with and without the --branch
options.

Reviewers: epriestley, bos, sid0, dschleimer

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D5014
src/repository/api/ArcanistMercurialAPI.php
src/workflow/ArcanistLandWorkflow.php