Explanations inside the patch. I've tested this on Mozilla-Central and it's
5 times faster than the naive approach on my laptop.
Details
- Reviewers
marmoute pulkit - Group Reviewers
hg-reviewers - Commits
- rHG32e21ac3adb1: repair: improve performance of detection of revisions affected by issue6528
Diff Detail
- Repository
- rHG Mercurial
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
The overall logic seems fine, but the affected_chain cache and the expected_metadata_len seems wrong,
mercurial/revlogutils/rewrite.py | ||
---|---|---|
591–592 | Should we check if they are affected ? or if they have metadata ? because if we have no diff compared to a revision that has metadata, we do have metadat and might have our parent swapped, unlike the delta base. | |
621–623 | I am confused about this check, why are we using filename here ? |
Looks overall good, but for the comment I made were we seems to do extra, unnecessary, revision restoration. I'll have a look tomorrow to check if we can safely remove this (and if not, why).
mercurial/revlogutils/rewrite.py | ||
---|---|---|
604 | This seems to trigger the slow path for a non linear revision and might slow things down. Why do we needs it ? |
mercurial/revlogutils/rewrite.py | ||
---|---|---|
604 | Dropping this line does not affect the correctness of the result and results in a significant speed up : 2m53 → 1m43 I am sending an updating this line dropped. |
✅ refresh by Heptapod after a successful CI run (🐙 💚)
⚠ This patch is intended for stable ⚠
✅ refresh by Heptapod after a successful CI run (🐙 💚)
⚠ This patch is intended for stable ⚠
Should we check if they are affected ? or if they have metadata ? because if we have no diff compared to a revision that has metadata, we do have metadat and might have our parent swapped, unlike the delta base.