Skip to content
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

git meta merge --no-ff is very very slow #691

Open
jhedwardyang opened this issue Feb 14, 2019 · 2 comments
Open

git meta merge --no-ff is very very slow #691

jhedwardyang opened this issue Feb 14, 2019 · 2 comments

Comments

@jhedwardyang
Copy link
Contributor

Repro steps:

git clone https://github.com/bpeabody/big-mono.git 
cd big-mono
git checkout f132442efc3a326188f1c6afc3547a3fc0512a19
git meta merge 720f26ec535e80aec6ab1392037cf7e86eb984eb --no-ff -m 'merge'

Expected:

  • fast

Actual:

  • slow
@shijinglu
Copy link
Collaborator

it takes about the same time with or without half-open enabled:

without half-open module:

$ time git meta merge 720f26ec535e80aec6ab1392037cf7e86eb984eb --no-ff -m 'merge'

Merging meta-repo commit 720f26ec535e80aec6ab1392037cf7e86eb984eb.

real 0m3.939s
user 0m2.133s
sys 0m0.875s

with half-open module:

$ time git meta merge 720f26ec535e80aec6ab1392037cf7e86eb984eb --no-ff -m 'merge'

Merging meta-repo commits f132442efc3a326188f1c6afc3547a3fc0512a19 and 720f26ec535e80aec6ab1392037cf7e86eb984eb
Merge commit created at 2f876012e0c856430f8cfc8855b49da298a1ddc2.

real 0m2.212s
user 0m1.657s
sys 0m0.599s

The reason is that it takes seconds to merge is because this repo has >6000 submodules and git-meta process iterate over all submodules twice during the merge. One for simple changes like adding, renaming or deleting submodules and the other iteration is for complicated merge conflicts if there are any.

@motlin
Copy link
Contributor

motlin commented Feb 19, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants