* [PATCH 3/3] git-p4: improve submit performance on new P4 servers
@ 2010-01-22 2:06 Pal-Kristian Engstad
2010-01-22 2:49 ` Nicolas Pitre
0 siblings, 1 reply; 4+ messages in thread
From: Pal-Kristian Engstad @ 2010-01-22 2:06 UTC (permalink / raw)
To: Simon Hausmann, Junio C Hamano; +Cc: git
Improve git-p4 submit performance on newer (from 2009.2) Perforce
servers by changing "p4 diff -du" to "p4 diff -dub". This change is
harmless since the output is only used for display purposes.
Signed-off-by: Pal-Kristian Engstad <pal_engstad@naughtydog.com>
---
contrib/fast-import/git-p4 | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index ab538b3..ec26cac 100755
--- a/contrib/fast-import/git-p4
+++ b/contrib/fast-import/git-p4
@@ -715,7 +715,7 @@ class P4Submit(Command):
submitTemplate = self.prepareLogMessage(template, logMessage)
if os.environ.has_key("P4DIFF"):
del(os.environ["P4DIFF"])
- diff = p4_read_pipe("diff -du ...")
+ diff = p4_read_pipe("diff -dub ...")
newdiff = ""
for newFile in filesToAdd:
--
1.6.5.2.6.gc3c1e.dirty
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 3/3] git-p4: improve submit performance on new P4 servers
2010-01-22 2:06 [PATCH 3/3] git-p4: improve submit performance on new P4 servers Pal-Kristian Engstad
@ 2010-01-22 2:49 ` Nicolas Pitre
2010-01-22 2:58 ` Pal-Kristian Engstad
0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Pitre @ 2010-01-22 2:49 UTC (permalink / raw)
To: Pal-Kristian Engstad; +Cc: Simon Hausmann, Junio C Hamano, git
On Thu, 21 Jan 2010, Pal-Kristian Engstad wrote:
> Improve git-p4 submit performance on newer (from 2009.2) Perforce
> servers by changing "p4 diff -du" to "p4 diff -dub". This change is
> harmless since the output is only used for display purposes.
>
> Signed-off-by: Pal-Kristian Engstad <pal_engstad@naughtydog.com>
Why is the b flag impacting performance?
And even if for display purposes, why might you wish not to see
differences in whitespace changes?
> ---
> contrib/fast-import/git-p4 | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
> index ab538b3..ec26cac 100755
> --- a/contrib/fast-import/git-p4
> +++ b/contrib/fast-import/git-p4
> @@ -715,7 +715,7 @@ class P4Submit(Command):
> submitTemplate = self.prepareLogMessage(template, logMessage)
> if os.environ.has_key("P4DIFF"):
> del(os.environ["P4DIFF"])
> - diff = p4_read_pipe("diff -du ...")
> + diff = p4_read_pipe("diff -dub ...")
>
> newdiff = ""
> for newFile in filesToAdd:
> --
> 1.6.5.2.6.gc3c1e.dirty
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 3/3] git-p4: improve submit performance on new P4 servers
2010-01-22 2:49 ` Nicolas Pitre
@ 2010-01-22 2:58 ` Pal-Kristian Engstad
2010-01-22 3:59 ` Nicolas Pitre
0 siblings, 1 reply; 4+ messages in thread
From: Pal-Kristian Engstad @ 2010-01-22 2:58 UTC (permalink / raw)
To: Nicolas Pitre; +Cc: Simon Hausmann, Junio C Hamano, git@vger.kernel.org
Nicolas Pitre wrote:
> On Thu, 21 Jan 2010, Pal-Kristian Engstad wrote:
>
>> Improve git-p4 submit performance on newer (from 2009.2) Perforce
>> servers by changing "p4 diff -du" to "p4 diff -dub". This change is
>> harmless since the output is only used for display purposes.
>>
>> Signed-off-by: Pal-Kristian Engstad <pal_engstad@naughtydog.com>
>
> Why is the b flag impacting performance?
That's a very good question. The release notes say that they've been
changing how 'p4 diff -du' works, but the net effect of it all is that
it stats all files in the whole working set. For large projects, this
takes forever. We say pauses of 3 minutes per submit...
> And even if for display purposes, why might you wish not to see
> differences in whitespace changes?
That's a good point, but what alternative is there?
PKE
--
Pål-Kristian Engstad (engstad@naughtydog.com),
Lead Graphics & Engine Programmer,
Naughty Dog, Inc., 1601 Cloverfield Blvd, 6000 North,
Santa Monica, CA 90404, USA. Ph.: (310) 633-9112.
"Emacs would be a far better OS if it was shipped with
a halfway-decent text editor." -- Slashdot, Dec 13. 2005.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 3/3] git-p4: improve submit performance on new P4 servers
2010-01-22 2:58 ` Pal-Kristian Engstad
@ 2010-01-22 3:59 ` Nicolas Pitre
0 siblings, 0 replies; 4+ messages in thread
From: Nicolas Pitre @ 2010-01-22 3:59 UTC (permalink / raw)
To: Pal-Kristian Engstad; +Cc: Simon Hausmann, Junio C Hamano, git@vger.kernel.org
On Thu, 21 Jan 2010, Pal-Kristian Engstad wrote:
> Nicolas Pitre wrote:
> > On Thu, 21 Jan 2010, Pal-Kristian Engstad wrote:
> >
> >> Improve git-p4 submit performance on newer (from 2009.2) Perforce
> >> servers by changing "p4 diff -du" to "p4 diff -dub". This change is
> >> harmless since the output is only used for display purposes.
> >>
> >> Signed-off-by: Pal-Kristian Engstad <pal_engstad@naughtydog.com>
> >
> > Why is the b flag impacting performance?
>
> That's a very good question. The release notes say that they've been
> changing how 'p4 diff -du' works, but the net effect of it all is that
> it stats all files in the whole working set.
And so does git.
> For large projects, this
> takes forever. We say pauses of 3 minutes per submit...
This is abominable.
> > And even if for display purposes, why might you wish not to see
> > differences in whitespace changes?
>
> That's a good point, but what alternative is there?
Have the option of not seeing the diff in the submit template maybe?
I agree that P4 is slow. Painfully slow. I even needed to make git-p4
even slower by adding a time.sleep(1) in p4_build_cmd() otherwise the
server would randomly drop the connection with the client when being
contacted back to back.
I'm so glad Simon wrote this git-p4 nevertheless. Makes working with P4
almost enjoyable.
Nicolas
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-01-22 3:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-22 2:06 [PATCH 3/3] git-p4: improve submit performance on new P4 servers Pal-Kristian Engstad
2010-01-22 2:49 ` Nicolas Pitre
2010-01-22 2:58 ` Pal-Kristian Engstad
2010-01-22 3:59 ` Nicolas Pitre
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).