Subject: Re: perforce import: git-p4 memory usage

From: Andreas Ericsson <[email-masked]>
Date: Fri, 23 May 2008 13:25:44 +0200

Luke Diamand wrote:
> Hi!
> 
> I'm trying to import part of a perforce repo with git-p4.
> 
> However, git-p4 appears to try to read all the repo into memory (and
> moreover seems to need about twice as much memory as repo).
> 
> Once it runs out of swap, it dies (unsurprisingly).
> 
> I think it's failing in readP4Files(), where it appears to read the
> entire repository in one go with "p4 -G -x - print".
> 
> Can I just rework this function to do stuff one file at a time? Or is
> that dumb?
> 

It's probably a lot slower, and since git works with changesets it
probably won't work all that good unless you somehow construct some
middle-stage which you can then feed to git-fastimport or some such.

-- 
Andreas Ericsson                   [email-masked]
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231