{"thread":{"id":"13632","subject":"Re: perforce import: git-p4 memory usage","startedAt":"2008-05-23T10:07:48Z","lastAt":"2008-05-23T22:27:06Z","messageCount":3,"participants":["Andreas Ericsson","Logan Kennelly","Luke Diamand"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"299046","messageId":"H1SlcXmh.1211537268.4996380.lgd@diamand.org","threadId":"13632","inReplyTo":"20080522160414.GA11158@sigill.intra.peff.net","subject":"perforce import: git-p4 memory usage","fromName":"Luke Diamand","fromEmail":"luke@diamand.org","sentAt":"2008-05-23T10:07:48Z","receivedAt":"2008-05-23T10:07:48Z","isPatch":false,"sender":{"key":"luke@diamand.org","avatar":"https://avatars.githubusercontent.com/u/5330967?v=4"},"body":"\nHi!\n\nI'm trying to import part of a perforce repo with git-p4.\n\nHowever, git-p4 appears to try to read all the repo into memory (and\nmoreover seems to need about twice as much memory as repo).\n\nOnce it runs out of swap, it dies (unsurprisingly).\n\nI think it's failing in readP4Files(), where it appears to read the\nentire repository in one go with \"p4 -G -x - print\".\n\nCan I just rework this function to do stuff one file at a time? Or is\nthat dumb?\n\nThanks\nLuke Diamand\n"},{"id":"77536","messageId":"4836A9B8.6070804@op5.se","threadId":"13632","inReplyTo":"H1SlcXmh.1211537268.4996380.lgd@diamand.org","subject":"Re: perforce import: git-p4 memory usage","fromName":"Andreas Ericsson","fromEmail":"ae@op5.se","sentAt":"2008-05-23T11:25:44Z","receivedAt":"2008-05-23T11:25:44Z","isPatch":false,"sender":{"key":"ae@op5.se","avatar":"https://gravatar.com/avatar/426e89595c75a8f5252dd0c989e5fabe5bcac616e68557427ad9aef6b0ca342a?d=mp&s=160"},"body":"Luke Diamand wrote:\n> Hi!\n> \n> I'm trying to import part of a perforce repo with git-p4.\n> \n> However, git-p4 appears to try to read all the repo into memory (and\n> moreover seems to need about twice as much memory as repo).\n> \n> Once it runs out of swap, it dies (unsurprisingly).\n> \n> I think it's failing in readP4Files(), where it appears to read the\n> entire repository in one go with \"p4 -G -x - print\".\n> \n> Can I just rework this function to do stuff one file at a time? Or is\n> that dumb?\n> \n\nIt's probably a lot slower, and since git works with changesets it\nprobably won't work all that good unless you somehow construct some\nmiddle-stage which you can then feed to git-fastimport or some such.\n\n-- \nAndreas Ericsson                   andreas.ericsson@op5.se\nOP5 AB                             www.op5.se\nTel: +46 8-230225                  Fax: +46 8-230231\n"},{"id":"77606","messageId":"C3A347D5-E9E2-4AEB-96EC-179972224CB3@sent.com","threadId":"13632","inReplyTo":"H1SlcXmh.1211537268.4996380.lgd@diamand.org","subject":"Re: perforce import: git-p4 memory usage","fromName":"Logan Kennelly","fromEmail":"logank@sent.com","sentAt":"2008-05-23T22:27:06Z","receivedAt":"2008-05-23T22:27:06Z","isPatch":false,"sender":{"key":"logank@sent.com","avatar":"https://gravatar.com/avatar/b7eb73a3eeb83e51f7b9a39a93c798da45e21d2f378efd58fc9139ec128a39f4?d=mp&s=160"},"body":"On May 23, 2008, at 3:07 AM, Luke Diamand wrote:\n\n> However, git-p4 appears to try to read all the repo into memory (and\n> moreover seems to need about twice as much memory as repo).\n>\n> Once it runs out of swap, it dies (unsurprisingly).\n>\n> I think it's failing in readP4Files(), where it appears to read the\n> entire repository in one go with \"p4 -G -x - print\".\n>\n> Can I just rework this function to do stuff one file at a time? Or is\n> that dumb?\n\n\nI don't know if they were ever accepted into the mainline, but see the\nseries of patches submitted by Tommy Thorn.\n\nhttp://article.gmane.org/gmane.comp.version-control.git/72342\n\n-- \n                                                         Logan Kennelly\n       ,,,\n      (. .)\n--ooO-(_)-Ooo--\n"}]}