{"thread":{"id":"22333","subject":"[PATCH 3/3] git-p4: improve submit performance on new P4 servers","startedAt":"2010-01-22T02:06:00Z","lastAt":"2010-01-22T03:59:24Z","messageCount":4,"participants":["Pal-Kristian Engstad","Nicolas Pitre"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"132359","messageId":"4B590808.6010206@naughtydog.com","threadId":"22333","inReplyTo":null,"subject":"[PATCH 3/3] git-p4: improve submit performance on new P4 servers","fromName":"Pal-Kristian Engstad","fromEmail":"pal_engstad@naughtydog.com","sentAt":"2010-01-22T02:06:00Z","receivedAt":"2010-01-22T02:06:00Z","isPatch":true,"sender":{"key":"pal_engstad@naughtydog.com","avatar":null},"body":"Improve git-p4 submit performance on newer (from 2009.2) Perforce\nservers by changing \"p4 diff -du\" to \"p4 diff -dub\". This change is\nharmless since the output is only used for display purposes.\n\nSigned-off-by: Pal-Kristian Engstad <pal_engstad@naughtydog.com>\n---\n contrib/fast-import/git-p4 |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4\nindex ab538b3..ec26cac 100755\n--- a/contrib/fast-import/git-p4\n+++ b/contrib/fast-import/git-p4\n@@ -715,7 +715,7 @@ class P4Submit(Command):\n             submitTemplate = self.prepareLogMessage(template, logMessage)\n             if os.environ.has_key(\"P4DIFF\"):\n                 del(os.environ[\"P4DIFF\"])\n-            diff = p4_read_pipe(\"diff -du ...\")\n+            diff = p4_read_pipe(\"diff -dub ...\")\n \n             newdiff = \"\"\n             for newFile in filesToAdd:\n-- \n1.6.5.2.6.gc3c1e.dirty\n"},{"id":"132368","messageId":"alpine.LFD.2.00.1001212147480.1726@xanadu.home","threadId":"22333","inReplyTo":"4B590808.6010206@naughtydog.com","subject":"Re: [PATCH 3/3] git-p4: improve submit performance on new P4 servers","fromName":"Nicolas Pitre","fromEmail":"nico@fluxnic.net","sentAt":"2010-01-22T02:49:48Z","receivedAt":"2010-01-22T02:49:48Z","isPatch":true,"sender":{"key":"nico@fluxnic.net","avatar":"https://avatars.githubusercontent.com/u/702790?v=4"},"body":"On Thu, 21 Jan 2010, Pal-Kristian Engstad wrote:\n\n> Improve git-p4 submit performance on newer (from 2009.2) Perforce\n> servers by changing \"p4 diff -du\" to \"p4 diff -dub\". This change is\n> harmless since the output is only used for display purposes.\n> \n> Signed-off-by: Pal-Kristian Engstad <pal_engstad@naughtydog.com>\n\nWhy is the b flag impacting performance?\n\nAnd even if for display purposes, why might you wish not to see \ndifferences in whitespace changes?\n\n> ---\n>  contrib/fast-import/git-p4 |    2 +-\n>  1 files changed, 1 insertions(+), 1 deletions(-)\n> \n> diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4\n> index ab538b3..ec26cac 100755\n> --- a/contrib/fast-import/git-p4\n> +++ b/contrib/fast-import/git-p4\n> @@ -715,7 +715,7 @@ class P4Submit(Command):\n>              submitTemplate = self.prepareLogMessage(template, logMessage)\n>              if os.environ.has_key(\"P4DIFF\"):\n>                  del(os.environ[\"P4DIFF\"])\n> -            diff = p4_read_pipe(\"diff -du ...\")\n> +            diff = p4_read_pipe(\"diff -dub ...\")\n>  \n>              newdiff = \"\"\n>              for newFile in filesToAdd:\n> -- \n> 1.6.5.2.6.gc3c1e.dirty\n> \n> \n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n> \n"},{"id":"132369","messageId":"4B591455.7050409@naughtydog.com","threadId":"22333","inReplyTo":"alpine.LFD.2.00.1001212147480.1726@xanadu.home","subject":"Re: [PATCH 3/3] git-p4: improve submit performance on new P4 servers","fromName":"Pal-Kristian Engstad","fromEmail":"pal_engstad@naughtydog.com","sentAt":"2010-01-22T02:58:29Z","receivedAt":"2010-01-22T02:58:29Z","isPatch":true,"sender":{"key":"pal_engstad@naughtydog.com","avatar":null},"body":"Nicolas Pitre wrote:\n> On Thu, 21 Jan 2010, Pal-Kristian Engstad wrote:\n> \n>> Improve git-p4 submit performance on newer (from 2009.2) Perforce\n>> servers by changing \"p4 diff -du\" to \"p4 diff -dub\". This change is\n>> harmless since the output is only used for display purposes.\n>>\n>> Signed-off-by: Pal-Kristian Engstad <pal_engstad@naughtydog.com>\n> \n> Why is the b flag impacting performance?\n\nThat's a very good question. The release notes say that they've been \nchanging how 'p4 diff -du' works, but the net effect of it all is that\nit stats all files in the whole working set. For large projects, this\ntakes forever. We say pauses of 3 minutes per submit...\n\n> And even if for display purposes, why might you wish not to see \n> differences in whitespace changes?\n\nThat's a good point, but what alternative is there?\n\nPKE\n-- \nPål-Kristian Engstad (engstad@naughtydog.com), \nLead Graphics & Engine Programmer,\nNaughty Dog, Inc., 1601 Cloverfield Blvd, 6000 North,\nSanta Monica, CA 90404, USA. Ph.: (310) 633-9112.\n\n\"Emacs would be a far better OS if it was shipped with \n a halfway-decent text editor.\" -- Slashdot, Dec 13. 2005.\n"},{"id":"132376","messageId":"alpine.LFD.2.00.1001212242550.1726@xanadu.home","threadId":"22333","inReplyTo":"4B591455.7050409@naughtydog.com","subject":"Re: [PATCH 3/3] git-p4: improve submit performance on new P4 servers","fromName":"Nicolas Pitre","fromEmail":"nico@fluxnic.net","sentAt":"2010-01-22T03:59:24Z","receivedAt":"2010-01-22T03:59:24Z","isPatch":true,"sender":{"key":"nico@fluxnic.net","avatar":"https://avatars.githubusercontent.com/u/702790?v=4"},"body":"On Thu, 21 Jan 2010, Pal-Kristian Engstad wrote:\n\n> Nicolas Pitre wrote:\n> > On Thu, 21 Jan 2010, Pal-Kristian Engstad wrote:\n> > \n> >> Improve git-p4 submit performance on newer (from 2009.2) Perforce\n> >> servers by changing \"p4 diff -du\" to \"p4 diff -dub\". This change is\n> >> harmless since the output is only used for display purposes.\n> >>\n> >> Signed-off-by: Pal-Kristian Engstad <pal_engstad@naughtydog.com>\n> > \n> > Why is the b flag impacting performance?\n> \n> That's a very good question. The release notes say that they've been \n> changing how 'p4 diff -du' works, but the net effect of it all is that\n> it stats all files in the whole working set. \n\nAnd so does git.\n\n> For large projects, this\n> takes forever. We say pauses of 3 minutes per submit...\n\nThis is abominable.\n\n> > And even if for display purposes, why might you wish not to see \n> > differences in whitespace changes?\n> \n> That's a good point, but what alternative is there?\n\nHave the option of not seeing the diff in the submit template maybe?\n\nI agree that P4 is slow. Painfully slow.  I even needed to make git-p4 \neven slower by adding a time.sleep(1) in p4_build_cmd() otherwise the \nserver would randomly drop the connection with the client when being \ncontacted back to back.\n\nI'm so glad Simon wrote this git-p4 nevertheless.  Makes working with P4 \nalmost enjoyable.\n\n\nNicolas\n"}]}