Fixes T5255. Currently the ./bin/repository parents workflow is quite slow. Batching up the SQL operations should make the workflow seem much faster.
Details
- Reviewers
epriestley - Group Reviewers
Blessed Reviewers - Maniphest Tasks
- T5255: Batch up SQL operations in the `./bin/repository parents` script
- Commits
- Restricted Diffusion Commit
rP1503840cd945: Batch up SQL operations in the `./bin/repository parents` script.
Not yet tested.
Diff Detail
- Repository
- rP Phabricator
- Branch
- repo_parents
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 826 Build 826: [Placeholder Plan] Wait for 30 Seconds
Event Timeline
We probably need PhabricatorLiskDAO::chunkSQL() around the actual queries to prevent overflowing the packet limit. This looks reasonable otherwise.
I'm not sure whether this is actually helping my initial issue... the whole process still seems very slow. I am investigating now.
In fact, I'm not convinced that this is much faster at all...
Before
> time ./bin/repository parents PP Rebuilding "rPP"... Rebuilding branch "production"... Found 3,714 total commit(s); updating... Done. real 3m16.982s user 0m12.769s sys 2m14.456s
After
time ./bin/repository parents PP Rebuilding "rPP"... Rebuilding branch "production"... Found 3,714 total commit(s); updating... Done. real 3m1.038s user 0m11.441s sys 2m17.209s
With select batching, this drops from 30s to ~2s for me locally when run on the Phabricator repo:
This didn't seem to help either.
> time ./bin/repository parents PP Rebuilding "rPP"... Rebuilding branch "production"... Found 3,714 total commit(s); updating... Done. real 3m11.955s user 0m11.469s sys 2m31.537s
With D9363 applied:
time ./bin/repository parents PP Rebuilding "rPP"... Rebuilding branch "production"... Found 3,714 total commit(s); updating... Done. real 0m1.545s user 0m0.712s sys 0m0.624s
:D
I'm going to grab this too since it does provide a real performance increase and the complexity is reasonably well isolated, it just pales in comparison to the progress bar perf issue.
Closed by commit rP1503840cd945 (authored by @joshuaspence, committed by @epriestley).