-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimization batch 14: trivial directory resolution #988
Optimization batch 14: trivial directory resolution #988
Conversation
/submit |
Submitted as pull.988.git.1625111177.gitgitgadget@gmail.com To fetch this version into
To fetch this version to local tag
|
On the Git mailing list, Ævar Arnfjörð Bjarmason wrote (reply to this):
|
User |
On the Git mailing list, Elijah Newren wrote (reply to this):
|
User |
On the Git mailing list, Elijah Newren wrote (reply to this):
|
This branch is now known as |
This patch series was integrated into seen via git@12b1a87. |
This patch series was integrated into seen via git@6813f9b. |
This patch series was integrated into seen via git@d1585ab. |
There was a status update in the "New Topics" section about the branch Further optimization on "merge -sort" backend. |
This patch series was integrated into seen via git@d99c6a2. |
This patch series was integrated into seen via git@e89073e. |
This patch series was integrated into seen via git@514cb87. |
There was a status update in the "Cooking" section about the branch Further optimization on "merge -sort" backend. Reviews? |
This patch series was integrated into seen via git@0df9466. |
This patch series was integrated into seen via git@042568b. |
There is an issue in commit 3ca6bea: |
3ca6bea
to
7133f0e
Compare
/submit |
Submitted as pull.988.v2.git.1626204784.gitgitgadget@gmail.com To fetch this version into
To fetch this version to local tag
|
User |
This patch series was integrated into seen via git@3d672c9. |
There was a status update in the "Cooking" section about the branch Further optimization on "merge -sort" backend. Reviews? |
This patch series was integrated into seen via git@cd6e010. |
This patch series was integrated into seen via git@b569790. |
This patch series was integrated into seen via git@25d7d73. |
There was a status update in the "Cooking" section about the branch Further optimization on "merge -sort" backend. Will merge to 'next'. |
Found multiple candidates in gitster/git: Using the first one. |
This patch series was integrated into seen via git@c348b09. |
This patch series was integrated into next via git@89cfdc4. |
Found multiple candidates in gitster/git: Using the first one. |
1 similar comment
Found multiple candidates in gitster/git: Using the first one. |
There was a status update in the "Cooking" section about the branch Further optimization on "merge -sort" backend. Will merge to 'master'. |
Found multiple candidates in gitster/git: Using the first one. |
This patch series was integrated into seen via git@55f6318. |
Found multiple candidates in gitster/git: Using the first one. |
2 similar comments
Found multiple candidates in gitster/git: Using the first one. |
Found multiple candidates in gitster/git: Using the first one. |
This patch series was integrated into seen via git@c283a77. |
Found multiple candidates in gitster/git: Using the first one. |
This patch series was integrated into seen via git@1cbe4a7. |
Found multiple candidates in gitster/git: Using the first one. |
1 similar comment
Found multiple candidates in gitster/git: Using the first one. |
This patch series was integrated into seen via git@02eb3e8. |
Found multiple candidates in gitster/git: Using the first one. |
There was a status update in the "Cooking" section about the branch Further optimization on "merge -sort" backend. Will merge to 'master'. |
Found multiple candidates in gitster/git: Using the first one. |
This patch series was integrated into seen via git@1a6fb01. |
This patch series was integrated into master via git@1a6fb01. |
Closed via 1a6fb01. |
This series depends textually on ort-perf-batch-12, but is
semantically independent. (It is both semantically and textually
independent of ort-perf-batch-13.)
Most of my previous series dramatically accelerated cases with lots of
renames, while providing comparatively minor benefits for cases with
few or no renames. This series is the opposite; it provides huge
benefits when there are few or no renames, and comparatively smaller
(though still quite decent) benefits for cases with many uncached
renames.
Changes since v3:
Changes since v2, addressing feedback from Stolee:
Changes since v1:
=== Basic Optimization idea ===
unpack_trees has had a concept of trivial merges for individual files
(see Documentation/technical/trivial-merge.txt). The same idea can be
applied in merge-ort. It'd be really nice to extend that idea to
trees as well, as it could provide a huge performance boost; sadly
however, applying it in general would wreck both regular rename
detection (the unmatched side can have new files that serve as
potential destinations in rename detection) and directory rename
detection (the unmatched side could have a new directory that was
moved into it).
If we somehow knew rename detection wasn't needed, we could do trivial
directory resolution. In the past, this wasn't possible. However...
With recent optimizations we have created a possibility to do trivial
directory resolutions in some cases. These came from the addition of
the "skipping irrelevant renames" optimizations (from ort-perf-batch-9
and ort-perf-batch-10), and in particular noting that we added an
ability to entirely skip rename detection in commit f89b4f2
("merge-ort: skip rename detection entirely if possible", 2021-03-11)
when there are no relevant sources. We can detect if there are no
relevant sources without recursing into the directories in question.
As a cherry on top, the caching of renames (from ort-perf-batch-11)
allows us to cover additional cases.
This series is all about adding all the special checks needed to
safely perform trival directory resolutions.
=== Results ===
For the testcases mentioned in commit 557ac03 ("merge-ort: begin
performance work; instrument with trace2_region_* calls", 2020-10-28),
the changes in just this series improves the performance as follows:
As a reminder, before any merge-ort/diffcore-rename performance work,
the performance results we started with (for merge-recursive as of
git-2.30.0) were:
cc: Derrick Stolee stolee@gmail.com
cc: Ævar Arnfjörð Bjarmason avarab@gmail.com
cc: Elijah Newren newren@gmail.com
cc: Bagas Sanjaya bagasdotme@gmail.com