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
Unknown Object (File)
Thu, Apr 11, 10:37 AM
Unknown Object (File)
Sun, Mar 31, 10:05 PM
Unknown Object (File)
Thu, Mar 28, 4:54 PM
Unknown Object (File)
Thu, Mar 28, 1:46 PM
Unknown Object (File)
Mar 4 2024, 11:31 PM
Unknown Object (File)
Feb 10 2024, 2:58 AM
Unknown Object (File)
Feb 6 2024, 11:29 PM
Unknown Object (File)
Feb 3 2024, 7:00 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.