All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pete Wyckoff <pw@padd.com>
To: Luke Diamand <luke@diamand.org>
Cc: git@vger.kernel.org
Subject: Re: [PATCH/RFC v2] git-p4: stream from perforce to speed up clones
Date: Sat, 25 Jul 2009 10:23:29 -0400	[thread overview]
Message-ID: <20090725142329.GA3841@arf.padd.com> (raw)
In-Reply-To: <1247301071-9541-1-git-send-email-luke@diamand.org>

luke@diamand.org wrote on Sat, 11 Jul 2009 09:31 +0100:
> Change commit() to stream data from Perforce and into fast-import
> rather than reading into memory first, and then writing out. This
> hugely reduces the memory requirements when cloning non-incrementally.
> 
> Signed-off-by: Luke Diamand <luke@diamand.org>
> ---
> I've modified git-p4 so that it streams/pipes data into fast-import rather
> that reading everything into memory first. The old scheme meant that
> for a large repository (mine is around 2G) my PC just grinds to a
> halt and never actually finishes. With this change it takes around ten
> minutes.
> 
> This is a resend of a patch I sent earlier, which my MUA helpfully
> managed to word-wrap.

This is definitely good stuff.  While I'd like to get Daniel's
native transport code working in my environment, I had a need to
import some big trees quickly from p4 to git.  Usually I resort to a
rare big-memory machine to do the git-p4 import, but with your
change, I can use my laptop without going into swap or
out-of-memory.

For the content, I would recommend some changes.  Here are some
patches on top of yours:

    [PATCH 1/5] git-p4 stream: remove unused function
    [PATCH 2/5] git-p4 stream: do not pass branchPrefixes so much
    [PATCH 3/5] git-p4 stream: show relative path in debug messages
    [PATCH 4/5] git-p4 stream: check apple file type
    [PATCH 5/5] git-p4 stream: use existing p4CmdList with callback

They clean up the code and change your main iterator loop to reuse
the existing p4CmdList.

I'd suggest you merge these into your patch and send it back out.
It's a worthwhile change and we should get Simon to review it.

		-- Pete

  reply	other threads:[~2009-07-25 14:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-11  8:31 [PATCH/RFC v2] git-p4: stream from perforce to speed up clones Luke Diamand
2009-07-25 14:23 ` Pete Wyckoff [this message]
2009-07-25 14:23   ` [PATCH 1/5] git-p4 stream: remove unused function Pete Wyckoff
2009-07-25 14:24   ` [PATCH 2/5] git-p4 stream: do not pass branchPrefixes so much Pete Wyckoff
2009-07-25 14:24   ` [PATCH 3/5] git-p4 stream: show relative path in debug messages Pete Wyckoff
2009-07-25 14:24   ` [PATCH 4/5] git-p4 stream: check apple file type Pete Wyckoff
2009-07-25 14:25   ` [PATCH 5/5] git-p4 stream: use existing p4CmdList with callback Pete Wyckoff

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090725142329.GA3841@arf.padd.com \
    --to=pw@padd.com \
    --cc=git@vger.kernel.org \
    --cc=luke@diamand.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.