git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git-p4: Fix support for symlinks.

From
SLScott Lamb <slamb@slamb.org>
Date
Aug 8, 2007, 01:36 UTC
Message-ID
<46B91E19.9010005@slamb.org>
In-Reply-To
<20070807091049.GA13308@bulgaria>
Brian Swetland wrote:
Show 8 quoted lines
> One observation on git-p4 -- it's a little memory hungry when processing
> large syncs.  I haven't tried incremental syncs on top of the initial
> one though -- if it's only the initial that's expensive it's not that
> big a deal.
> 
> It seemed to top out around 988MB resident.  The branch I was importing
> is about 562MB when checked out and the resulting git repository is
> about 175MB.

While importing each change, I think git-p4 puts into memory two copies of the contents of all changed files, one in p4CmdList and one in readP4Files. (That's the raw contents, not just the delta.) I don't think there's any fundamental reason it couldn't stream them instead.

So incremental syncs may or may not take less memory. If the first change imports a huge project and no subsequent change ever touches all those files at once, then yeah. But if, say, you periodically change the copyright dates in all files in the repository, you'll have this memory usage whenever syncing such a change.

As long as we're listing git-p4 complaints, here are a couple of mine:
1) coding style. *self-nag* Simon Hausmann mentioned he was happy to 
accept patches...and I made one up a while ago; I just need to do a 
merge and final check that I haven't broken anything before sending it off.
2) it breaks on tempfile purges. My previous employer has these in their 
repository, and I think for the moment they're working around it by 
treating a "purge" as a "delete". If I read the Perforce documentation 
right, though, only the latest version of a tempfile's contents is kept 
in the repository anyway. Their history can't be captured accurately, so 
the proper thing is probably to omit tempfiles entirely. (And deleting 
files when they become tempfiles and creating files when they become a 
normal type.)

Best regards, Scott

-- 
Scott Lamb <http://www.slamb.org/>
Previous: Brian Swetland
Message 4 of 4 in “git-p4: Fix support for symlinks.”
  1. git-p4: Fix support for symlinks.Simon Hausmann, Aug 7, 2007
  2. Junio C HamanoAug 7, 2007
  3. Brian SwetlandAug 7, 2007
  4. Scott LambAug 8, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.