git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* very slow cherry-pick'ing (old-2.6-bkcvs tree)
@ 2007-09-06 23:51 Erez Zadok
  2007-09-07  4:42 ` Shawn O. Pearce
  2007-09-07  7:27 ` Johannes Sixt
  0 siblings, 2 replies; 3+ messages in thread
From: Erez Zadok @ 2007-09-06 23:51 UTC (permalink / raw)
  To: git; +Cc: ezk

Our group maintains Unionfs on the latest -rc kernel, but we also maintain
several backports going all the way to 2.6.9.  Once we complete the
development and testing of a feature/fix in -latest, we cherry-pick those
commits to older backports, and test those.  When I cherry-pick from -latest
to my 2.6.{22,21,20,19,18} repositories, it works reasonably fast.  But when
I cherry-pick to my 2.6.9 tree, it runs about 20 times slower!  Why?  Is
there anything I can do to inspect what's going on and perhaps speed up the
cherry-picking process?

Some info:

My 2.6.{18,19,20,21,22} trees were cloned from

   git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.<N>.y.git

My 2.6.9 tree, however, was cloned from

   git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/old-2.6-bkcvs.git

after which, I truncated the tree (git-reset) to Linus commit which read
"Linux 2.6.9-final".

BTW, I first git-clone --bare to my git server, and then I clone from it to
my test machine.

BTW2, I do git-repack and prune-packed every week.

Thanks,
Erez.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: very slow cherry-pick'ing (old-2.6-bkcvs tree)
  2007-09-06 23:51 very slow cherry-pick'ing (old-2.6-bkcvs tree) Erez Zadok
@ 2007-09-07  4:42 ` Shawn O. Pearce
  2007-09-07  7:27 ` Johannes Sixt
  1 sibling, 0 replies; 3+ messages in thread
From: Shawn O. Pearce @ 2007-09-07  4:42 UTC (permalink / raw)
  To: Erez Zadok; +Cc: git

Erez Zadok <ezk@cs.sunysb.edu> wrote:
> Our group maintains Unionfs on the latest -rc kernel, but we also maintain
> several backports going all the way to 2.6.9.  Once we complete the
> development and testing of a feature/fix in -latest, we cherry-pick those
> commits to older backports, and test those.  When I cherry-pick from -latest
> to my 2.6.{22,21,20,19,18} repositories, it works reasonably fast.  But when
> I cherry-pick to my 2.6.9 tree, it runs about 20 times slower!  Why?  Is
> there anything I can do to inspect what's going on and perhaps speed up the
> cherry-picking process?

I'm guessing its due to rename detection.

git-cherry-pick is implemented in terms of git-merge-recursive,
which always does rename detection when files are deleted or added.
This can take some considerable time if there's a lot of files that
have been added/deleted.

What would probably be faster would be to dump the patches in
question using git-format-patch and then apply them using git-am.
This bypasses the rename detection as it is using strictly a diff
and an apply.

-- 
Shawn.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: very slow cherry-pick'ing (old-2.6-bkcvs tree)
  2007-09-06 23:51 very slow cherry-pick'ing (old-2.6-bkcvs tree) Erez Zadok
  2007-09-07  4:42 ` Shawn O. Pearce
@ 2007-09-07  7:27 ` Johannes Sixt
  1 sibling, 0 replies; 3+ messages in thread
From: Johannes Sixt @ 2007-09-07  7:27 UTC (permalink / raw)
  To: Erez Zadok; +Cc: Git Mailing List

Erez Zadok schrieb:
> Our group maintains Unionfs on the latest -rc kernel, but we also maintain
> several backports going all the way to 2.6.9.  Once we complete the
> development and testing of a feature/fix in -latest, we cherry-pick those
> commits to older backports, and test those.  When I cherry-pick from -latest
> to my 2.6.{22,21,20,19,18} repositories, it works reasonably fast.  But when
> I cherry-pick to my 2.6.9 tree, it runs about 20 times slower!  Why?  Is
> there anything I can do to inspect what's going on and perhaps speed up the
> cherry-picking process?
> 
> Some info:
> 
> My 2.6.{18,19,20,21,22} trees were cloned from
> 
>    git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.<N>.y.git
> 
> My 2.6.9 tree, however, was cloned from
> 
>    git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/old-2.6-bkcvs.git
> 
> after which, I truncated the tree (git-reset) to Linus commit which read
> "Linux 2.6.9-final".

I *think* that the reason for this is that those repositories don't have any 
commits in common (but I don't have clones to verify my claim). Since 
cherry-pick does merge-recursive, it tries to find a suitable merge base, 
but since there is no history in common, it walks both histories all the way 
down only to find that there is no possible merge base.

You could improve the situation if you graft the histories together:

   echo $first_commit_in_2.6.12 $suitable_commit_in_bkcvs > .git/info/grafts

-- Hannes

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-09-07  7:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-06 23:51 very slow cherry-pick'ing (old-2.6-bkcvs tree) Erez Zadok
2007-09-07  4:42 ` Shawn O. Pearce
2007-09-07  7:27 ` Johannes Sixt

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).