Page MenuHomePhabricator

Make re-running `rebuild-identities` a bit faster and add a little progress information
ClosedPublic

Authored by epriestley on Jun 12 2018, 2:08 PM.
Tags
None
Referenced Files
F14403265: D19484.id46600.diff
Mon, Dec 23, 2:06 AM
F14400961: D19484.diff
Sun, Dec 22, 8:47 PM
Unknown Object (File)
Sun, Dec 22, 3:59 AM
Unknown Object (File)
Tue, Dec 10, 5:04 PM
Unknown Object (File)
Sun, Dec 8, 4:18 AM
Unknown Object (File)
Nov 7 2024, 7:00 AM
Unknown Object (File)
Oct 17 2024, 10:46 PM
Unknown Object (File)
Oct 14 2024, 3:52 PM
Subscribers
None

Details

Summary

Ref T13151. Ref T12164. Two small tweaks:

  • If we aren't actually going to change anything, just skip the writes. This makes re-running/resuming a lot faster (~20x, locally).
  • Print when we touch a commit so there's some kind of visible status.

This is just a small quality-of-life tweak that I wrote anyway while investigating T13152, and will make finishing off db024, db025 and db010 manually a little easier.

Test Plan
  • Set authorIdentityPHID + committerIdentityPHID to NULL.
  • Ran rebuild-identities, saw status information.
  • Ran rebuild-identiites again, saw it go faster with status information.

Diff Detail

Repository
rP Phabricator
Branch
faster1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 20406
Build 27710: Run Core Tests
Build 27709: arc lint + arc unit

Event Timeline

amckinley added inline comments.
src/applications/repository/management/PhabricatorRepositoryManagementRebuildIdentitiesWorkflow.php
36–38

I was thinking we could speed this up instead by searching for commits without identities, but presumably users might want to actually "rebuild all identities", as advertised...

66–73

I'm convinced that reusing $identity_phid here is ok, but it took me a second.

81–83

...and presumably doing all these writes is the expensive part of the operation anyway.

This revision is now accepted and ready to land.Jun 12 2018, 7:18 PM
This revision was automatically updated to reflect the committed changes.